-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix autoreload on SAMD21 #3532
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
Fix autoreload on SAMD21 #3532
Conversation
The issue was that a time.sleep() would set the RTC wake up further into the future even if we wanted to tick every ms. Ticking every ms is used to time the autoreload delay and without it, autoreload doesn't work. Fixes micropython#3528
@todbot, this should fix the autoreload issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Built and tested on a Feather M0 Basic that I had tested the issue on previously. These changes fix the problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see anything to be concerned abut in the re-organization of _port_interrupt_after_ticks, and at a high level the explanation of the problem makes sense. No testing performed.
I'm curious: what's the device-based testing regime like? Is that documented somewhere? I'd like to get into testing stuff like this and would like to leverage any existing work. And thanks for such a quick turnaround on this! |
I think you are assuming we're more rigorous than we are. I just replicated the problem and then fixed it. I didn't test on other devices. I rely on folks trying their own You can test PR changes by either pulling the PR down and building locally or waiting for the CI to complete. Once the CI is complete, you can access the built versions by:
No problem! It's core to the CircuitPython experience so it's good to get fixed. |
oh wow I didn't realize you had CI produce artifacts for every board for every PR! Go github actions I guess eh? This is much easier than the process I just did. (the standard PR pull, build via cmdline, and fish out firmware.uf2) |
Yup! It's nice but a little slow. :-) |
The issue was that a time.sleep() would set the RTC wake up
further into the future even if we wanted to tick every ms. Ticking
every ms is used to time the autoreload delay and without it,
autoreload doesn't work.
Fixes #3528