-
Notifications
You must be signed in to change notification settings - Fork 27
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
power.deep_sleep()
without wake up sources does not go to sleep
#126
Comments
I think this is a "feature" of the CODAL: if there are no wake up sources configured, and no timeout, then the |
We could fix this on the MicroPython side by just calling the CODAL |
This has been changed/fixed in the CODAL side in this PR, so we can just wait for the next tag to get the fix: |
This is resolved in CODAL v0.2.43, we can close it when #132 is merged, or a different commit updates CODAL in the main branch. |
CODAL v0.2.43 is updated here. |
This might be related to this CODAL issue:
However, based on the latest conversations with @JohnVidler we were thinking the issue might be in the MakeCode extension instead of CODAL.
However, in MicroPython executing
power.deep_sleep()
doesn't go to sleep either. Having a brief look the MicroPython code I can't see an obvious reason why it might not go to sleep if it's supported within CODAL itself:micropython-microbit-v2/src/codal_port/modpower.c
Lines 54 to 109 in 2233d79
micropython-microbit-v2/src/codal_app/microbithal.cpp
Lines 130 to 136 in 6ea476f
Example programme to replicate with MicroPython v2.1.0-beta.3:
This always shows the SURPRISED face and doesn't go to sleep
The text was updated successfully, but these errors were encountered: