I've noticed that when I plug in the micro-USB to my ESP32 I have to manually press the reset button to get it to run its program. Because I have the ESP32 chip on a custom PCB though I'd like to make this happen automatically but am not sure how, or why it doesn't already happen.
According to the datasheet when EN is high the chip is enabled, and EN is pulled up to the ESP's power source. This power source is 3.3V right after I plug in the power supply. So why isn't the MCU turning on?
Because the RST button on the board pulls the EN to GND, maybe the EN must be briefly pulled to GND before it can turn on. But if this is what is happening, how can it be done automatically?
-
\$\begingroup\$ Sounds like LVD isn't configured correctly. \$\endgroup\$Lundin– Lundin2021年10月14日 06:51:12 +00:00Commented Oct 14, 2021 at 6:51
2 Answers 2
The supply voltage must be stable before EN is asserted. If EN rises before the supply is stable, the behavior is undefined (and a "frozen" chip is a very typical behavior). Try adjusting the values of R301/C303 to get a slower EN rise. The exact timing requirements are specified in the datasheet (note, CHIP_PU is routed to the EN pin, pin 3, on ESP32 modules):
Make sure you're complying with the 50μs t0 requirement. Also pay attention to the note about the bypass capacitors discharging.
If that's not the issue, check the other strapping pins (particularly DL#) and make sure it's not powering up in download boot mode. The strapping pins and required values at EN rise are listed in the datasheet.
-
\$\begingroup\$ From this answer, it sounds like I am getting frozen chip when power is applied and if my capacitors were designed properly this wouldn't happen. I am not sure about the strapping pin comment, are you referring to IO0 (upload) being pulled to ground at start-up? To adjust R301 and C303, I assume going with larger values here is the way to go? Higher capacitance slower response, and less current flow with the higher resistance. Am I correct with these assumptions? \$\endgroup\$Feynman137– Feynman1372021年10月14日 14:21:29 +00:00Commented Oct 14, 2021 at 14:21
-
1\$\begingroup\$ Yes, you could increase C303 to 1uF to slow down the EN rise time by 10x. And yes, I meant IO0 (DL#) and there are also 4 other strap pins you might check. All have to have correct values at the moment EN rises above the reset release threshold. \$\endgroup\$TypeIA– TypeIA2021年10月14日 14:39:28 +00:00Commented Oct 14, 2021 at 14:39
-
1\$\begingroup\$ @Feynman137 By chance, I just noticed that the ESP32-WROVER-E datasheet recommends a 10k/1uF RC for EN for most applications, but that their dev boards use much faster circuits (12k/1nF for ESP32-CoreBoard v2, 10k/100nF for DevKitC-v4). Probably the LDOs on these boards come up very fast, making this okay, but that's just a guess. Good luck! \$\endgroup\$TypeIA– TypeIA2021年10月15日 09:03:51 +00:00Commented Oct 15, 2021 at 9:03
Just design a one-shot timer that will mimic what a user would do. When the power supply is detected to be stable, after (for example) 100 ms sends a signal to a MOSFET that shorts that button during another 100 ms and the device should turn on automatically every time you apply power.
-
1\$\begingroup\$ At best this is a very ugly hack. A properly designed board shouldn't need such a thing. \$\endgroup\$TypeIA– TypeIA2021年10月14日 12:38:19 +00:00Commented Oct 14, 2021 at 12:38