ESP32-WROOM-32D does not always reset on power-up
-
- Posts: 11
- Joined: Wed Sep 13, 2023 11:12 am
ESP32-WROOM-32D does not always reset on power-up
I have made a board using the ESP32-WROOM-32D N16 module. I have flashed it with code. When pugged into the laptop via USB, the UART kicks in and resets the board, and the code runs without needing to manually press the reset button. When powered on via and external power supply, it requires you to press the reset button before the code runs. The code should immediately execute. This does not happen reliably; sometimes it works, sometimes it doesn't. My initial PCB prototype had a capacitor value of 0.1uF on the RC delay circuit on the EN pin, same as the official schematic. This did not work, so I hand soldered a THT 10uF capacitor in parallel to that. After doing that modification, the board reliably booted correctly, executing the code when powered on.
For my next revision of the board, I changed the 0.1uF capacitor to a 10uF SMD component. Now I have the problem mentioned above, where it does not always execute the code on power up. I have measured the voltage level on the EN pin. This RC delay circuit has a total rise time of about 6ms. Here is my schematic. Please note that the resistors on the GPIO pins are 0 ohm resistors, which I used in case I need to debug and disconnect any of the pins from the rest of the board.
For my next revision of the board, I changed the 0.1uF capacitor to a 10uF SMD component. Now I have the problem mentioned above, where it does not always execute the code on power up. I have measured the voltage level on the EN pin. This RC delay circuit has a total rise time of about 6ms. Here is my schematic. Please note that the resistors on the GPIO pins are 0 ohm resistors, which I used in case I need to debug and disconnect any of the pins from the rest of the board.
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32-WROOM-32D does not always reset on power-up
Do you happen to have a capacitor to ground (possibly because you want to debounce the button) on GPIO0?
-
- Posts: 11
- Joined: Wed Sep 13, 2023 11:12 am
Re: ESP32-WROOM-32D does not always reset on power-up
I do. It is 0.1uF. Here are the rest of the schematics
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32-WROOM-32D does not always reset on power-up
Yeah, remove that. Likely it's empty when you boot up and it is only charged by the internal pullup on GPIO0, so there's a high chance the ESP32 comes out of reset and sees GPIO0 low, causing it to boot into download mode rather than start your application.
Re: ESP32-WROOM-32D does not always reset on power-up
Apart from the topic, for the next revision of the pcb, you may want to update the module to the current revision, which is the the ESP32-WROOM-32E
-
- Posts: 11
- Joined: Wed Sep 13, 2023 11:12 am
Re: ESP32-WROOM-32D does not always reset on power-up
Thanks for the suggestion. I found a timing diagram in the datasheet. What I understood from it was that IO0 must be kept high for at least 1ms while EN is low. Let's assume both IO0 and EN start to charge up at the same time. For EN, on the oscilloscope, I measure a total rise time from power on of about 6ms. For IO0, using the internal (weak) pullup of 45k ohms and my capacitor of 0.1uF, I calculate the time constant to be 4.5ms. To be considered high, V_IH must be 0.75*VCC (according to the datasheet). This happens at t = 1.4*RC, or 1.4 time constants, which is 6.3ms. This does explain why it doesn't boot from SPI code on power up. This also explains why it is able to boot correctly on subsequent power ups, because the IO0 capacitor is already charged.ESP_Sprite wrote: ↑Fri Nov 24, 2023 2:28 amYeah, remove that. Likely it's empty when you boot up and it is only charged by the internal pullup on GPIO0, so there's a high chance the ESP32 comes out of reset and sees GPIO0 low, causing it to boot into download mode rather than start your application.
Extended question, why does the datasheet say to put a capacitor on IO0. Keep in mind my capacitor on EN is 10uF, 100 times the recommended amount (the recommended value did not work for me)
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32-WROOM-32D does not always reset on power-up
Where do you see this?anees.ahmad.jaffer wrote: ↑Mon Nov 27, 2023 9:23 amExtended question, why does the datasheet say to put a capacitor on IO0.
-
- Posts: 11
- Joined: Wed Sep 13, 2023 11:12 am
Re: ESP32-WROOM-32D does not always reset on power-up
Not on the chip/module datasheet (https://www.espressif.com/sites/default ... eet_en.pdf), but on the devboard schematic: https://dl.espressif.com/dl/schematics/ ... v4-sch.pdf. This is also where I got the value for my first RC delay circuit (R=10k, C=0.1uF), which didn't work. Then I used 10uF which worked most of the time
-
- Posts: 2
- Joined: Wed Jun 26, 2024 4:02 am
Re: ESP32-WROOM-32D does not always reset on power-up
I had this issue with just 1 esp32 wroom dev board. It was the only board I have seen with that issue after using dozens of esp32 wroom boards. The fix was fairly simple and seems to be reliable. The unit has been powered down/up dozens of times in the last few days. Just bridge the vin (5v) to GPIO 0 with a 10kohm resistor.
Here is a diagram to clarify:
Here is a diagram to clarify:
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32-WROOM-32D does not always reset on power-up
Odd, maybe there's some conductive crap somewhere on the PCB that forms some resistance between GPIO0 and ground. One remark, though: better run the resistor between 3.3V and GPIO0; the GPIOs on the ESP32 aren't rated to be 5V-compatible.peterdrinnan wrote: ↑Thu Jun 27, 2024 3:53 amI had this issue with just 1 esp32 wroom dev board. It was the only board I have seen with that issue after using dozens of esp32 wroom boards. The fix was fairly simple and seems to be reliable. The unit has been powered down/up dozens of times in the last few days. Just bridge the vin (5V) to GPIO 0 with a 10kohm resistor.
Who is online
Users browsing this forum: No registered users and 237 guests