ESP32 runs program only after EN pressed.

hra.leinonen
Posts: 3
Joined: Wed Aug 25, 2021 7:56 am

ESP32 runs program only after EN pressed.

Postby hra.leinonen » Wed Aug 25, 2021 8:05 am

Hi all,

I have strange problem.

I have 2 Elecrow ARS01119B - ESP-WROOM-32 boards and I can upload my code if I press boot button and it is ok.
However my code won't start to run when I take power (USB) off and put it back on. Only way to get code running is
to press EN button. Any suggestion what I can do to prevent that forced EN press?

Best regards,

Ville

martinius96
Posts: 33
Joined: Thu Dec 13, 2018 1:39 am

Re: ESP32 runs program only after EN pressed.

Postby martinius96 » Wed Aug 25, 2021 1:44 pm

Problem is same at most popular Devkit ESP32 boards.
There are used 2 capacitors for EN and Boot signal with same characterstics.
So when you plug on ESP to USB, there is for small duration of time GND signal at EN and BOOT (because capacitors are charging).
This state is known as DOWNLOAD state. If you press BOOT and EN button in same time, you will set ESP32 to download mode.
Output in Serial looks like (In Arduino IDE you can't see it, because if you open Serial monitor it will reset ESP32):

Code: Select all

rst:0x1 (POWERON_RESET),boot:0x0 (DOWNLOAD_BOOT(UART0/UART1/SDIO_FEI_FEO_V2))
waiting for download
You can use other ESP to read its HW Serial to see that output in it's console.
In this mode ESP32 is locked until you reset it manually via EN button, there is no timeout of some mechanism like that that will let you run code without reset.

So fast solution is: Use different capacitor for one of signals or remove capacitor from BOOT, or add 10K resistor between BOOT (GPIO 0) and Vcc. If you use any of these methods, it will run your program when you plug it to usb without need of resetting ;) .

peterwong
Posts: 1
Joined: Sun Oct 08, 2023 10:09 pm

Re: ESP32 runs program only after EN pressed.

Postby peterwong » Sun Oct 08, 2023 10:13 pm

thank you for this post! i had exactly the same issue with an old DevkitC board i was using, and adding in the 10k resistor between GPIO 0 and 5V cleared it right up. :mrgreen:

Who is online

Users browsing this forum: No registered users and 137 guests