ESP32 and DeepSleep

RS_Jim
Posts: 3
Joined: Tue Jun 09, 2026 4:34 pm

ESP32 and DeepSleep

Postby RS_Jim » Tue Jun 09, 2026 4:53 pm

I have an ESP32 C3 that has been programed for deep sleep mode waking up every 5 seconds to take a measurement on a BME680 device and send that measurement via ESP-Now. The program writes to the serial monitor during each wake up period and confirms that the message was successfully sent. I need to reprogram the ESP with a different sleep interval and I cannot seem to be able to make that happen as the tools that I am trying to use cannot connect to the ESP while it is asleep. The wake up period is too short for the web tools to connect and burn new software. I have the bin file for the boot loader and have used ESPWEBTool successfully to replace a corrupted boot partition. Any suggestions as to how I might be able to recover this ESP32C3?
RS_Jim

Sprite
Espressif staff
Espressif staff
Posts: 10619
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 and DeepSleep

Postby Sprite » Wed Jun 10, 2026 1:39 am

Yes. You can always (that is, unless you have actively messed with fuses to e.g. put the chip into SecureBoot mode) get an ESP32 back into download mode. On the C3, you do that by pulling down GPIO9 (and GPIO8 up if needed) and making reset low for a moment. If you're using a development board: press the BOOT button, press and release the RESET button, release the BOOT button.

RS_Jim
Posts: 3
Joined: Tue Jun 09, 2026 4:34 pm

Re: ESP32 and DeepSleep

Postby RS_Jim » Thu Jun 11, 2026 12:57 am

Thanks, I will give this a try. I have XAIO ESP32C3 and will try the bootbutton and reset button trick first. If that doesn't work I will try the other. I will let you know which worked.
thanks again,
Jim

RS_Jim
Posts: 3
Joined: Tue Jun 09, 2026 4:34 pm

Re: ESP32 and DeepSleep

Postby RS_Jim » Thu Jun 25, 2026 9:09 pm

Holding down the boot button and pressing and releasing the reset button did the trick. Thanks for the help.
Jim

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

Re: ESP32 and DeepSleep

Postby lichurbagan » Mon Jun 29, 2026 11:49 pm

One thing I've found helpful when experimenting with deep sleep ..... is to add a short startup delay (even 3–5 seconds) during development ..... before entering the sleep loop. It gives you enough time to reconnect the programmer or serial monitor if you need to flash new firmware, and you can remove or reduce the delay once everything is stable.

User avatar
krzychb
Espressif staff
Espressif staff
Posts: 426
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: ESP32 and DeepSleep

Postby krzychb » Tue Jun 30, 2026 3:02 am

I was not aware of ESPWEBTool. Thank you for sharing.

TIL one extra option :D to connect.
It can be done by using esptool and configuring it to open the serial port repeatedly (with a short 0.1-second delay between attempts). It's specifically designed for similar situations where the chip is in deep sleep and only wakes up briefly. The mode is configured by setting

Code: Select all

ESPTOOL_OPEN_PORT_ATTEMPTS=0
environmental variable, ref. Connect Loop.

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], ChatGPT-User, DuckDuckGo [Bot] and 8 guests