Hi all. I am running a sketch on esp32-C3 with arduino framework on Windows 10. I am putting the board in deep sleep then using a hardware pin to wake it up and cycling this every 30 seconds. I think it is working because I hear the USB connect and disconnect but the serial monitor seems to “cut out” or stops refreshing after the board goes to sleep. I think the code may be running correctly because if I close the serial monitor then reopen a new one, some of the lines of “Serial.println” from the previous sleep wake cycle appear - but then it stops working again. Is this normal? Seems to me once the board wakes up and goes through setup, the serial monitor ought to start working again.
PlatformIO should attempt reconnection to a serial device it lost the connection to. Is no such log visible? Do you do something like
Serial.end(); before deep sleeping?
I’m not sure about ESP32, but the ATmega328 data sheet says that the USART must be reconfigured after waking from sleep. I suspect the ESP32 data sheet for your device will most likely say the same.
Not at the moment. My Sleep() subroutine os very minimal. Ill try Serial.end()…but to answer your question, it does not re-establish communications. I typically have to shut down the terminal and open a new one.
I just received an ESP32-C6 Wroom 1 from Waveshare and am experiencing the same problem. Previously, I was using a Heltec V3 LoRa board and had no problems. I’m using espidf with the simplest deep sleep timer example. I get output until the device sleeps and then nothing. (An external LED is confirming sleep-wake cycles are actually happening).