Put ESP into flash mode and then reset, while still using FTDI?

Thread Starter

bmbouter

Joined May 29, 2021
75
I have a custom PCB layout that incorporates the AI-Thinker ESP-12F. To keep it low-cost and simple I didn't want to put a USB controller+UART, e.g. CP2102N, onboard so I use a typical FTDI controller and it works great. I put it into programming mode with two onboard push button switches, one resetting by pulling RST low and the other that pulls GPIO0 high and that also works fine.

I'm programming these a lot now and these switches are becoming cumbersome. What can I add to my schematic that can have the FTDI put the ESP into flash mode and then have it auto Reset after programming is complete?

I know the nodeMCU's do this with a "looping looking schematic" in the USB to UART section of the nodeMCU schematic here. It's the part in between the CH340G and the nRST and GPIO0 lines. Maybe I can do something like that only keep my FTDI as my off-board programmer?
 

Ya’akov

Joined Jan 27, 2019
10,226
For the circuit in the schematic to work you need to be able to control two signals. They are using DTR and RTS. The FTDI doings usually have RTS and CTS available. You would have to make the uploader toggle those two lines appropriately.

Or you could use a different USB UART dongle the has those signals on it.
 

Thread Starter

bmbouter

Joined May 29, 2021
75
Thanks for the replies. My FTDI does have the DTR and RTS lines on it, so I'm going to add the schematic (image below) from the nodemcu schematic and remove my manual switches. I'll try to post back how it goes (in a few weeks when they are delivered from JLCPCB).

1659895207191.png

Note this is just the things connected to DTR and RTS, the C7 and C8 parts connected to the VCC are just in the screenshot I took because I didn't remove them.
 
Top