Skip to content

Finer grained, per port tick locking #3546

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 13, 2020
Merged

Finer grained, per port tick locking #3546

merged 2 commits into from
Oct 13, 2020

Conversation

tannewt
Copy link
Member

@tannewt tannewt commented Oct 13, 2020

Fixes #3504 hopefully.

cc @deshipu and @cwalther

@tannewt tannewt added this to the 6.0.0 milestone Oct 13, 2020
@tannewt tannewt requested a review from DavePutz October 13, 2020 01:44
deshipu
deshipu previously approved these changes Oct 13, 2020
Copy link

@deshipu deshipu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested it with PewPew10 and it seems to fix the issue #3504, there is no flickering visible anymore.

@DavePutz DavePutz marked this pull request as ready for review October 13, 2020 16:51
DavePutz
DavePutz previously approved these changes Oct 13, 2020
Copy link
Collaborator

@DavePutz DavePutz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on the SAMD21 boards; Pulsein works fine and didn't see any other issues. I tested without setting RTC_READREQ_RREQ in rtc_set_continuous(), and it looks like it works fine without that bit set.

@tannewt tannewt dismissed stale reviews from DavePutz and deshipu via 2bc40bc October 13, 2020 17:16
Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad we had the Discord discussion about this, it helped me follow what was going on better. Thanks @tannewt

The key is, this reduces the length of time that interrupts are disabled when reading the RTC. This is especially important on SAMD21 but fixes were applied to each port that potentially required them.

@cwalther
Copy link

Confirmed, the flickering is much improved on a PewPew 10.2 with the binary from CI, though not totally gone. Interestingly, the influence of the USB connection is reversed now: With a USB connection, I never get any flickering. Without a USB connection, I still get some flickering when CPU usage is low (much time spent in time.sleep()).

@tannewt tannewt merged commit 3d21eec into adafruit:main Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problems with _pew on SAMD21
5 participants