Page 1 of 1

ESP32-C3 USB CDC exiting light seep

Posted: Tue Mar 07, 2023 1:13 pm
by andrea.longobardi85
Hello,

I am developing an app based on the ESP32-C3 USB interface (CDC) both from programming and serial printing to a terminal.
I need the device to go into light sleep from time to time. What I have observed is that when exiting form light sleep the USB CDC interface is not working anymore.
The device is not printing anymore data and I can't even reprogram the unit via USB. I need to force the download mode resetting and holding IO9 low.
I am using Arduino IDE, therefore I am base don the ESP-IDF 4.4.3 .
Did anyone have this issue? or been able to solve it?

Thanks,

Andrea

Re: ESP32-C3 USB CDC exiting light seep

Posted: Wed Mar 08, 2023 12:53 am
by ESP_Sprite
Known hardware design issue, unfortunately.
"The USB Serial/JTAG controller will not work during sleep (both light and deep sleep) due to the lack of an APB and USB PHY clock during sleep." (src)

Re: ESP32-C3 USB CDC exiting light seep

Posted: Wed Mar 08, 2023 2:01 am
by axellin

Re: ESP32-C3 USB CDC exiting light seep

Posted: Wed Mar 08, 2023 10:13 am
by andrea.longobardi85
Thanks!
I would happy just to have the USB CDC interface working when I exit light sleep, not during light seep itself. And just for serial communication, not for debug.
On the STM32 for example, when you enter stop modes the PC loses the connection with the USB CDC, but when existing the stop mode you can restart the USB CDC interface via software on the micro and the PC will list again the port and communication can happen again.
Is there a way to do something similar with the ESP32-C3?

Thanks for your great help!

Andrea

Re: ESP32-C3 USB CDC exiting light seep

Posted: Thu Mar 09, 2023 12:53 am
by ESP_Sprite
Hm, I'd expect it to do that automatically. Would you be willing to create a small example exhibiting the problem and file a bug report for this, so we can look into it?