0
\$\begingroup\$

I'm designing custom hardware based on the ESP32. I'm using Adafruit's ESP32 Huzzah as a reference. In the Adafruit design, an onboard CP2104 USB-to-UART chip is used, but I will be programming the ESP32 with an external USB-to-UART converter.

Unfortunately, my USB-to-UART converter does not have an RTS pin. It only has the DTR, RXD, TXD, VCC, CTS, and GND pins.

The attached circuit is the auto-programming circuit and I wish to add this to my custom board. What should I do in order to program the ESP32 given my situation?

enter image description here

**Update: I ended up getting the Adafruit CP2104 Friend board that has the RTS and DTR pins in addition to the other pins.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ RTS and DTR are used to reset and hold GPIO0 in order to put the esp32 into bootloader mode. The choice of what control signals is determined by the application used to download the code. There are examples written in Python, so you can modify it to use another modem control signal. Failing that, have a switch or other means to hold GPIO0 low when powered on. \$\endgroup\$
    – Kartman
    Commented Oct 19, 2022 at 22:59
  • \$\begingroup\$ @Kartman It would be possible to change software to another handshake output signal, if there existed other handshake outputs. DTR and RTS are the only two handshake outputs, so there is nothing that can be done if there is access to only one handshake output. \$\endgroup\$
    – Justme
    Commented Oct 20, 2022 at 0:47

3 Answers 3

1
\$\begingroup\$

Your solution is the ESP-PROG from Espressif. It only uses GND, TX, RX (uart), EN and GPIO0. It will do the trick with the boot and reset buttons for you, automatically.

You don’t need the MMBT2222’s, only a header or TAG Connect (the latter can be connected directly to the ESP-PROG. It also saves components.

You can optionally feed your project trough the ESP-PROG (3.3V/5V), but i don’t use that myself.

ESP-Prog

6-pin TAG Connect

Retention for TAG Connect

\$\endgroup\$
2
\$\begingroup\$

Only TX and RX are needed, for the other signals you can use switches instead.

Of-course, having the signals available is more convenient, than having to maually restart the processor for programming.

Unfortunately, my USB-to-UART converter does not have an RTS pin. It only has the DTR, RXD, TXD, VCC, CTS, and GND pins.

Maybe there's an internal node you can tap to get RTS, have a look inside your usb-to uart device.

\$\endgroup\$
1
  • \$\begingroup\$ I highly recommend setting up over-the-air updates (OTA) as soon as possible in development. This way you only need to program via the UART loader once, and can get away with manual switches or even jumpers for DL#/EN since they're rarely needed. There are examples online for setting up OTA. \$\endgroup\$
    – TypeIA
    Commented Oct 20, 2022 at 9:42
0
\$\begingroup\$

Buy a compatible USB UART converter with pins you need.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.