ESP-WROOM-32 doesn't wake from lightsleep on timer #10097
Replies: 2 comments 8 replies
-
Just to complete the image, although it might not matter in you case: which firmware version do you use? |
Beta Was this translation helpful? Give feedback.
-
Are you by any chance using the WebREPL? If so, calling Calling If you are not using the WebREPL I would suggest posting a complete program that can be used to reproduce the problem. Please post the complete content of boot.py too. A link to the type of board being used might help too. |
Beta Was this translation helpful? Give feedback.
-
Light sleep is pretty straightforward on my D1 Minis. When I tried similar code on an ESP-WROOM-32, the device never woke up. All I'm doing is calling this:
machine.lightsleep(sleep_duration_ms) # e.g., 1000 to sleep for one second
Just in case there some confusion about units and passing large values was actually indicating seconds instead of milliseconds, I've also tried calling it with very small numbers, such as 1. I never get the terminal prompt back, nor does the device reboot or otherwise rerun main from the top, as would be expected from deepsleep, which I'm not testing anyway. It simply hangs after calling lightsleep as shown above and must be reset with a physical push of the onboard reset button.
Do I need to tie some wake pin to some reset pin, as is necessary on some ESP8266 systems. Although that was only necessary for deepsleep anyway, not lightsleep. The ESP32 doesn't have clearly labeled wake or reset pins, although I'm practically certain the EN pin is the reset pin, but I still don't know which pin would be the wake pin. Some looking around suggest I might be able to configure any RTC GPIO as a wake pin tied to the EN pin -- but I still don't see why that would be necessary to merely make lightsleep work effectively? Should it just work directly from a single line of code, as above?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions