Page 1 of 1
ESP32 runs program only after EN pressed.
Posted: Wed Aug 25, 2021 8:05 am
by hra.leinonen
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
Re: ESP32 runs program only after EN pressed.
Posted: Wed Aug 25, 2021 1:44 pm
by martinius96
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
.
Re: ESP32 runs program only after EN pressed.
Posted: Sun Oct 08, 2023 10:13 pm
by peterwong
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.
Re: ESP32 runs program only after EN pressed.
Posted: Tue Jun 11, 2024 9:17 am
by ebinmjohnson
Is there any alternative solutions rather than hardware approach like the resistors or removing capacitors? Thanks in advance.
Re: ESP32 runs program only after EN pressed.
Posted: Tue Jun 11, 2024 10:03 am
by ESP_Sprite
Like what? Given that you're software isn't even starting up, this is not something you can solve in software.
Re: ESP32 runs program only after EN pressed.
Posted: Tue Jun 11, 2024 10:10 am
by ebinmjohnson
I was wondering if anything can be done in bootloader, during booting, or in configuration files. Like disabling the download mode, I donno if this is possible.
Re: ESP32 runs program only after EN pressed.
Posted: Wed Jun 26, 2024 4:16 am
by peterdrinnan
"Add a 10K resistor between BOOT (GPIO 0) and Vcc." - This worked for me. Previously wasted time with a capacitor between EN and ground, and also a 100k resistor between GPIO 0 and 3.3v. Nothing worked until I connected the 10k resistor between GPIO 0 and VCC (5v).