RP2040: ignore pin changes before deep sleep #7196
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #7081
Ignore pin alarm changes before deep sleep has started. Previously, the pin could change, triggering the interrupt handler, and clearing the alarm setup, preventing detecting pin change during deep sleep. Now the interrupt routine ignores changes until the last possible moment. There is a tiny sliver of a race condition, but it is very, very narrow.
@billedluh Could you test this? IThanks. tested on a Feather RP2040, grounding a jumper many times before sleep. I was able to reproduce your #7081 problem, but could not after this fix.
To find a build to try, wait until the builds have finished. Then click on the "Details" link next to an RP2040 build below, then click on Summary at the top of the left sidebar, and then scroll down to find the "Artifacts". Download the .zip and unpack it to find a .uf2 to load.