-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
docs(deep-sleep-stub.rst): Added documentation about re-entering deep sleep from wake stub (IDFGH-12569) #13571
base: master
Are you sure you want to change the base?
Conversation
… sleep from wake stub
👋 Hello Lupindakaas, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
|
||
Before going back to deep-sleep you must set a wake up source. This can be a timer, GPIO pin or the ULP. This has to be set using `REG_SET_FIELD(RTC_CNTL_WAKEUP_STATE_REG, RTC_CNTL_WAKEUP_ENA, WAKEUP_MASK)`, where `WAKEUP_MASK` is a byte containing true on all enabled wakeup reasons. These reasons are defined in: https://github.com/espressif/esp-idf/blob/master/components/esp_rom/include/esp32/rom/rtc.h. | ||
|
||
.. note:: When using ULP wakeup, it is probably best to leave the wakeup state and just start the RTC timer using `REG_SET_FIELD(RTC_CNTL_STATE0_REG, RTC_CNTL_ULP_CP_SLP_TIMER_EN, 1)`. |
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.
REG_SET_FIELD(RTC_CNTL_STATE0_REG, RTC_CNTL_ULP_CP_SLP_TIMER_EN, 1)
is for enabling the timer wake-up source for the ULP coprocessor, which is independent of the deep-sleep-stub
feature is not a universal usage method, I think it is not necessary to explain it.
@Lupindakaas But the description in this file should be applicable to all esp chips. For some other esp32 series chips, the registers name and function have changed. Do you mind if I restart an update to this doc internally? |
Hi, that would be awesome! I also send an email on the feedback form with some more documentation is missed whist working on our wake stub code, maybe you could check that out too. |
This PR adds documentation to the deep sleep wake stub docs detailing how to re-enter deep sleep from the wake stub.