Page 1 of 1

light sleep, can't wake up

Posted: Mon Dec 08, 2025 4:51 pm
by vvb333007
Hello!

Recently I noticed that my code which uses light sleep stopped to work: CPU goes to the light sleep but not going back.

I tried all wakeup sources but it don't wake up.

Even more: board becomes unresponsive so I can not reflash it with esptool! Have to press "reset" button.

Anybody experience this problem? It is ESP32-S3 with PSRAM. Arduino framework. All I do is: set up wakeup source (timer, 5 seconds) and call light_sleep_start(). The same setup with deep sleep works (when I replace light_sleep_start with deep_sleep_start).

This code was written I worked as expected for last few months until recent upgrade (new ESP-IDF).

PS: Happens ONLY when USB-CDC is used as a console. When it is UART0 it all works. Looks like USB-CDC dies after entering light sleep

Re: light sleep, can't wake up

Posted: Mon Dec 08, 2025 5:46 pm
by lichurbagan
This is a known ESP-IDF regression on the ESP32-S3. Light sleep now shuts down USB-CDC clocks. USB dies and the chip cannot wake. Deep sleep works because it fully resets USB. UART0 works because it stays powered. Workarounds are simple. Disable peripheral power-down, keep USB clocks alive, or switch your console to UART0. Rolling back the ESP32 Arduino core also fixes it.

Re: light sleep, can't wake up

Posted: Mon Dec 08, 2025 7:59 pm
by vvb333007
This is a known ESP-IDF regression on the ESP32-S3......Disable peripheral power-down, keep USB clocks alive
Thank you very much!

Re: light sleep, can't wake up

Posted: Tue Dec 09, 2025 8:44 am
by vvb333007
Disable peripheral power-down, keep USB clocks alive
Should I make changes to ESP-IDF for that or there is an API to select which peri should be down and which are up?
Thanks!