-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
ESP32-S2: cannot lightsleep again after a wakeup from ULP (IDFGH-4396) #6229
Comments
Thanks for the report and sharing the details and sorry for the inconvenience, we will look into. |
@yannpom Could you try acknowledging and clearing the wakeup state from the main program? You can do this using |
I edited REG_CLR_BIT(RTC_CNTL_INT_CLR_REG, RTC_CNTL_COCPU_INT_CLR);
esp_light_sleep_start();
REG_CLR_BIT(RTC_CNTL_INT_CLR_REG, RTC_CNTL_COCPU_INT_CLR); But I get the same behaviour. |
I was having this exact same problem, reading this issue lead me to the solution:
(Just need to set rather than clear the bit) |
…om ULP Since ulp wakeup signal are connected to ulp int raw(except esp32), we need to clear ulp int raw before sleep when ulp wakeup enabled. Otherwise, if the ulp int raw is already set, chip will not sleep properly. Closes #6229
… ULP Since ulp wakeup signal are connected to ulp int raw(except esp32), we need to clear ulp int raw before sleep when ulp wakeup enabled. Otherwise, if the ulp int raw is already set, chip will not sleep properly. Closes #6229
…om ULP Since ulp wakeup signal are connected to ulp int raw(except esp32), we need to clear ulp int raw before sleep when ulp wakeup enabled. Otherwise, if the ulp int raw is already set, chip will not sleep properly. Closes #6229
Environment
Problem Description
On the ESP32-S2, I start the ULP RISC-V with an infinite loop calling
ulp_riscv_wakeup_main_processor()
at around 1 Hz.On the main CPU I configure the ULP as the only wakeup source then I enter lightsleep.
Around 1 second after, the main CPU is awoken as expected.
Then I re-enter lightsleep, but this time the lightsleep exits instantly. (Before any wakeup call from the ULP).
Expected Behavior
The ESP32-S2 should enter lightsleep a second time, and exit a second time ~1 second later (when the ULP sends the wakeup signal).
Actual Behavior
After a first successful lightsleep / resume, every subsequent lightsleep exits instantly.
Steps to reproduce
Compile, flash and run the following code:
Code to reproduce this issue
main.c
ulp/ulp.c
CMakeLists.txt
sdkconfig.defaults
Debug Logs
The text was updated successfully, but these errors were encountered: