I designed a custom board with an ESP-12F and a CP2104. Everything works perfectly except the reset of the MCU during flashing. I have to hold down the reset button and roll my finger to the boot button and hold it like that until it starts flashing. Then, I have to press reset one more time when it’s done flashing before my new firmware will actually start. If I don’t, I get
"/usr/bin/python" "/home/marcel/.platformio/packages/tool-esptoolpy@1.30000.201119/esptool.py" --before default_reset --after hard_reset --chip esp8266 --port "/dev/ttyUSB1" --baud 115200 write_flash 0x0 .pio/build/nodemcuv2/firmware.bin
esptool.py v3.0
Serial port /dev/ttyUSB1
Connecting........_____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header
Everything looks identical to this NodeMCU schematic except for some 10k vs 12k resistors and the 470p cap on RST. Could that really make such a difference? And of course they use a CH340G while I use CP2104.
You have a global net label and net label of the same name (RST) so they are shorted together.
You probably have other similar mistakes on the other pages.
Thanks for the answer. I tried a 10k pullup to 3.3V but same thing. That also wouldn’t make sense that I can get it working using the RST and BOOT buttons.
The last post suggests placing the 10uF capacitor between the GPIO0 line and ground and a 100nF between RESET (EN) and ground to create the correct delay on each pin.
It also has a link to the Espressif schematic.
The term is 'strapping pins' and they define behavior at boot when pulled LOW vs (HIGH or Free-floating) and the same goes for GPIO 1 aka Tx.
But since the OP can get it to work by keeping GPIO 0 LOW and reset, the issue must be in the automated reset system somehow.
What i did notice is the lack of the 470R resistor between GPIO 0, your 'boot' button and GND. Like that you may burn GPIO 0 by accident if it is in output mode and 'HIGH' and you press that button.
That may be relevant though i guess they are interchangeable.
Best advice i can come up with is using a oscilloscope or logic analyzer to figure out what happens with the !DTR & !RST outputs.
gippity say -- The EN (CH_PD) pin needs to rise after VCC, or at least not too early. If it comes up too fast, the chip may not reset properly.
Fix: Add an RC delay to EN—e.g., 10kΩ pull-up with a 1µF cap to GND gives ~10ms delay. This ensures EN rises after VCC stabilizes.