light sleep, can't wake up

vvb333007
Posts: 71
Joined: Wed Jul 31, 2024 5:53 am
Location: Thailand
Contact:

light sleep, can't wake up

Postby vvb333007 » Mon Dec 08, 2025 4:51 pm

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
Thanks!
Slava.

lichurbagan
Posts: 60
Joined: Thu Nov 13, 2025 3:20 pm

Re: light sleep, can't wake up

Postby lichurbagan » Mon Dec 08, 2025 5:46 pm

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.

vvb333007
Posts: 71
Joined: Wed Jul 31, 2024 5:53 am
Location: Thailand
Contact:

Re: light sleep, can't wake up

Postby vvb333007 » Mon Dec 08, 2025 7:59 pm

This is a known ESP-IDF regression on the ESP32-S3......Disable peripheral power-down, keep USB clocks alive
Thank you very much!
Thanks!
Slava.

vvb333007
Posts: 71
Joined: Wed Jul 31, 2024 5:53 am
Location: Thailand
Contact:

Re: light sleep, can't wake up

Postby vvb333007 » Tue Dec 09, 2025 8:44 am

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!
Thanks!
Slava.

Who is online

Users browsing this forum: Qwantbot and 4 guests