Fix alarm.wake_alarm not set after deep sleep on pi pico#7137
Closed
georgboe wants to merge 1 commit into
Closed
Conversation
Collaborator
|
Thanks for the insight! This is not a problem on ESP32-nn alarms because the "alarm happened" state is not cleared by |
Collaborator
|
Note to myself: fix should also take #6476 into account. That is on Espressif, but there may be a more general solution here. |
Collaborator
|
Subsumed by #7154. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hi,
EDIT: Fixes #6483.
I would like to see this issue fixed, so I had a look at it.
The problem here seems to be that watchdog's scratch register is read and
alarm.wake_alarmis assigned inrun_boot_pyas a part ofstart_mp. Afterwards the scratch register is cleared byalarm_reset(https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/common-hal/alarm/__init__.c#L105). By the time we get torun_code_pythe scratch register has already been cleared and we have nothing that indicates that we have woken from deep sleep soalarm.wake_alarmis set toNone.I'm not sure how you'd like this to be fixed. But if you can please have a look at the changes and suggest improvements or a different approach, I'd willing to change it.