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
Why does default_idle_hook() lock deep sleep? #6199
Comments
This was intentionally added for backward compatibility. Previously only sleep was invoked, therefore deep sleep is locked to keep the same behavior. If you remove the deep sleep locking, some platform might potentially not wake up. Does that answer your question? |
How is deep sleep meant to be used? Is it just meant for tickless targets or is |
Yes, you can attach your own handler and overwrite the default behavior. Or enable tickless for your platform (there is feature sleep branch to actually address this, it contains specifications and tests, target additions will follow). |
Description
Question
According to the documentation, sleep is managed automatically, including deep sleep. However from what I see, deep sleep is locked by
default_idle_hook()
for non-tickless targetsmbed-os/rtos/TARGET_CORTEX/mbed_rtx_idle.cpp
Lines 220 to 228 in ce4d6c9
What is the reason for this? What is the expected way of entering deep sleep?
I know that it is possible to use a custom
default_idle_hook()
, but before I do, I would like to understand it more.The text was updated successfully, but these errors were encountered: