ESP-WROOM-32 Flashing Issues – Troubleshooting Auto-Program UART

esp32

I just made a custom schematic and PCB with an ESP-WROOM-32 module. The board has a USB-UART chip (CP2102) and an auto-program circuitry to flash firmware without pressing buttons, but it doesn't work: esptool.py stops with

Failed to connect to ESP32: Timed out waiting for packet header

Here are the relevant parts on my schematic:

Programmer on custom ESP32-based board

Programmer on custom ESP32-based board

I tried desoldering Q1 and Q2 and put two pushbuttons (+ pullups) and I could verify that the TX/RX lines are working, as I could flash a firmware.

I took the schematic from the LOLIN32 board.

Best Answer

The LOLIN32 schematic shows C6 with a too large capacity (1uF). That is important for the timing, as the auto-program circuitry needs to assert EN for the right amount of time.

In the reference schematic it's just 1nF:

enter image description here

The WEMOS D32 uses 100nF:

enter image description here

As I had an 100nF capacitor, I used that as a replacement and the auto-circuitry finally started working.

Related Topic