ESP32 not booting until reset button pressed
-
- Posts: 2
- Joined: Tue Apr 19, 2022 2:51 pm
ESP32 not booting until reset button pressed
Hello,
I've created a custom PCB design with an ESP32 WROOM 32D (8mb) flash. The board works ok, but the ESP32 only boots after the enable button is pressed. That means, when I plugin the ESP with USB nothing happens in the serial monitor (and also for example "blink" example does not work). As soon as I press the enable button on the PCB, the code start to run.
Does anyone know what I did wrong? I'm new to PCB design so if you find the error, please try to explain in newbish .
Here is a picture of the wiring:
Thanks for helping out!
I've created a custom PCB design with an ESP32 WROOM 32D (8mb) flash. The board works ok, but the ESP32 only boots after the enable button is pressed. That means, when I plugin the ESP with USB nothing happens in the serial monitor (and also for example "blink" example does not work). As soon as I press the enable button on the PCB, the code start to run.
Does anyone know what I did wrong? I'm new to PCB design so if you find the error, please try to explain in newbish .
Here is a picture of the wiring:
Thanks for helping out!
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32 not booting until reset button pressed
Possibly your 3.3V rail powers up too slow for your reset RC circuit to effectively work. You can try replacing C9 with an 1uF cap, see if that helps.
Re: ESP32 not booting until reset button pressed
Please remove C2 at IO0, this cap could lead to download mode.
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
-
- Posts: 19
- Joined: Tue Mar 23, 2021 6:22 am
Re: ESP32 not booting until reset button pressed
There is a fundamental error in the design of the cross-connected Q1, Q2 circuit.
If you draw the truth table for the circuit, it is impossible to have EN and IO0 low at the same time. This is exactly the condition required during bootloader reset - IO0 should be low during the rise of RESET.
Adding the capacitor at RESET just creates a slow rise time on the RESET signal to "delay" reset to make RESET rise > 50us later than IO0 (set data sheet reset timing).
However, Espressif does not supply any documentation regarding the maximum rise time for the RESET signal. There is the potential for multiple or partial RESETs if the rise time is too long.
The circuit is silly. The emitter of Q1 and Q2 should just be connected to GND for two separate open collector drivers. But this would require a change to the esptool.py.
If you draw the truth table for the circuit, it is impossible to have EN and IO0 low at the same time. This is exactly the condition required during bootloader reset - IO0 should be low during the rise of RESET.
Adding the capacitor at RESET just creates a slow rise time on the RESET signal to "delay" reset to make RESET rise > 50us later than IO0 (set data sheet reset timing).
However, Espressif does not supply any documentation regarding the maximum rise time for the RESET signal. There is the potential for multiple or partial RESETs if the rise time is too long.
The circuit is silly. The emitter of Q1 and Q2 should just be connected to GND for two separate open collector drivers. But this would require a change to the esptool.py.
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32 not booting until reset button pressed
I do kinda agree, but you need to keep the original reason for this circuit in mind: most terminal programs will toggle DTR/RTS in some way, and this circuit has been specifically designed to minimize the issue with a terminal program resetting the ESP32 or putting it in download mode. If you look at the truth table in a vacuum, you're absolutely correct that it's a bit silly, but with that in mind, it makes more sense, at least to me.ChrisAlfred wrote: ↑Tue Dec 20, 2022 1:13 amThe circuit is silly. The emitter of Q1 and Q2 should just be connected to GND for two separate open collector drivers. But this would require a change to the esptool.py.
Re: ESP32 not booting until reset button pressed
Hi folks,
Thank´s for all contribuition at this topic. Anyway I´m having the same issue here. I´ve develop a board, within the CH340 Serial Converter and the same transistors circuit. Everything runs fine, until after I compile and upload the binary to the ESP32. It´s almost the same circuit of our friend that had opened the topic. But, there is a bit difference between the behavior from my ESP32. Besides I have to click at the reset button, the ESP32 just start to work if it is connected with a serial monitor, that is, if I´m not with the Serial Monitor opened and listening (I´m using VSCODE with PlatformIO), the microcontroler does not start the normal behavior, running the code at void setup() and after, at void loop().
It just starts at the condition of being connected with a serial monitor activated on PlatformIO AND then, if I click the reset button. Even though, If I just click at the reset button using another power supply source, without the USB cable, the ESP32 doesn´t start to work.
Do you think this behavior happens by the same cause of the initial topic or could be another reason for this different process to make the ESP32 work?
And, please, after I read all the comments, I still do not understood what is the solution. Could someone help me?
Thanks a lot,
Airton
Thank´s for all contribuition at this topic. Anyway I´m having the same issue here. I´ve develop a board, within the CH340 Serial Converter and the same transistors circuit. Everything runs fine, until after I compile and upload the binary to the ESP32. It´s almost the same circuit of our friend that had opened the topic. But, there is a bit difference between the behavior from my ESP32. Besides I have to click at the reset button, the ESP32 just start to work if it is connected with a serial monitor, that is, if I´m not with the Serial Monitor opened and listening (I´m using VSCODE with PlatformIO), the microcontroler does not start the normal behavior, running the code at void setup() and after, at void loop().
It just starts at the condition of being connected with a serial monitor activated on PlatformIO AND then, if I click the reset button. Even though, If I just click at the reset button using another power supply source, without the USB cable, the ESP32 doesn´t start to work.
Do you think this behavior happens by the same cause of the initial topic or could be another reason for this different process to make the ESP32 work?
And, please, after I read all the comments, I still do not understood what is the solution. Could someone help me?
Thanks a lot,
Airton
Re: ESP32 not booting until reset button pressed
I have the same problem, my program C++ on Arduino IDE doesn't restart when I press the Reset button unless the serial monitor is put on. Board: Adafruit Feather eSP32-S2 Reverse. Any help will be appreciated.
Re: ESP32 not booting until reset button pressed
Hi AlainS, were you able to resolve this issue? I am having the same problem with my esp32-c6. Pressing the reset button does not restart the program.
Re: ESP32 not booting until reset button pressed
I'm having a similar issue than the other folks. This is the circuit of my custom board:
And this is the Arduino IDE code to show the problem:
Whenever an external CH340 usb to serial interface is connected, everything works as expected.
When the external USB interface is not connected, the ESP32 does not boot (the white led does not lights up), and the ESP32 needs a reset to continue the boot.
Please note that the ESP32 is not pulling the power from the CH340. It merely needs it to be connected, even if the ESP32 is being powered on by another USB cable.
As it can be seen in the photos, the white led (lit when the boot happens) lights up even if the CH340 is not the primary power source:
When there is no USB interface connected through the flat cable, that is, there is nothing connected to the TX, RX, RTS and DTR in the circuit, the ESP32 halts the boot until the reset button is pressed:
Have you ever managed to find the solution for this? We're having very similar problems.
It would be great if anyone returned with an update.
And this is the Arduino IDE code to show the problem:
- #define GENERIC_USE_LED 27
- void setup() {
- pinMode(GENERIC_USE_LED, OUTPUT);
- digitalWrite(GENERIC_USE_LED, HIGH);
- }
When the external USB interface is not connected, the ESP32 does not boot (the white led does not lights up), and the ESP32 needs a reset to continue the boot.
Please note that the ESP32 is not pulling the power from the CH340. It merely needs it to be connected, even if the ESP32 is being powered on by another USB cable.
As it can be seen in the photos, the white led (lit when the boot happens) lights up even if the CH340 is not the primary power source:
When there is no USB interface connected through the flat cable, that is, there is nothing connected to the TX, RX, RTS and DTR in the circuit, the ESP32 halts the boot until the reset button is pressed:
Hi, Airton!airmigjr wrote: ↑Sat Jan 07, 2023 3:59 pmHi folks,
Thank´s for all contribuition at this topic. Anyway I´m having the same issue here. I´ve develop a board, within the CH340 Serial Converter and the same transistors circuit. Everything runs fine, until after I compile and upload the binary to the ESP32. It´s almost the same circuit of our friend that had opened the topic. But, there is a bit difference between the behavior from my ESP32. Besides I have to click at the reset button, the ESP32 just start to work if it is connected with a serial monitor, that is, if I´m not with the Serial Monitor opened and listening (I´m using VSCODE with PlatformIO), the microcontroler does not start the normal behavior, running the code at void setup() and after, at void loop().
It just starts at the condition of being connected with a serial monitor activated on PlatformIO AND then, if I click the reset button. Even though, If I just click at the reset button using another power supply source, without the USB cable, the ESP32 doesn´t start to work.
Do you think this behavior happens by the same cause of the initial topic or could be another reason for this different process to make the ESP32 work?
And, please, after I read all the comments, I still do not understood what is the solution. Could someone help me?
Thanks a lot,
Airton
Have you ever managed to find the solution for this? We're having very similar problems.
It would be great if anyone returned with an update.
Who is online
Users browsing this forum: No registered users and 125 guests