1
\$\begingroup\$

I see a lot of info on how to auto-upload (meaning without holding/pressing down any button). The ESP32 dev does this using the below circuit:

enter image description here

However, in my case, I do not have a USB to TTL IC. I currently have two buttons (RST and PROG), in order to program my ESP32.

enter image description here

I also program my SMD ESP32 version using the ESP32 Dev board, but connecting the RX (ESP32 Dev) to TX (ESP32 SMD) and TX (ESP32 Dev) to RX (ESP32 SMD) and then ground the two together. Currently, this works but holding down buttons to flash the ESP32 SMD is becoming annoying, is there a way I can auto-upload like they do in the first picture?

\$\endgroup\$
2
  • \$\begingroup\$ you don't have to hold the buttons. hold io 0, click reset, release io 0. the esp stays in bootloader. initiate upload \$\endgroup\$
    – Juraj
    Commented Jan 13, 2022 at 6:17
  • \$\begingroup\$ Buy yourself the official Espressif ESP-PROG :) \$\endgroup\$
    – RemyHx
    Commented Dec 2, 2022 at 20:11

1 Answer 1

1
\$\begingroup\$

I had this same situation. If your board has accessible pins on the reset and download boot strapping nets, you could rig up a Raspberry Pi / Bus Pirate / Favorite SBC/Micro with open-drain outputs to pull these pins down at the right times.

But the solution that worked a lot better for me was to implement Over-the-Air Updates (OTA) as early as possible in the development process. It takes a little extra work, but then you don't need the UART at all for programming (after the first initial load of course).

Unrelated: why are you crossing RX and TX? Are you sure that's what you're doing? When you piggy-back an external ESP32 onto a dev board, RX and TX don't cross (that is, DevBoard.ESP32.TX <-> OffBoard.ESP32.TX). Maybe you meant from the perspective of the CP2102 (true: CP2102.RX <-> ESP32.TX).

\$\endgroup\$
11
  • \$\begingroup\$ Can you add a circuit? If possible for the wiring of the first paragraph, I only have the esp32 dev module to programme \$\endgroup\$
    – JoeyB
    Commented Jan 12, 2022 at 17:44
  • \$\begingroup\$ @JoeyB I'm not sure it's possible only using the dev board. The issue is that the dev board's own ESP32 must be held in reset so it doesn't conflict with your ESP32's UART. I assume this is what you're doing, Therefore you can't piggy-back the auto-download pulldown from the dev board. You'd have to pull the reset externally, either from a separate MCU/SBC or (as you're doing now) a button. \$\endgroup\$
    – TypeIA
    Commented Jan 12, 2022 at 18:23
  • \$\begingroup\$ Oh I'm currently using a jumper between EN and GND on my esp32 dev board. \$\endgroup\$
    – JoeyB
    Commented Jan 12, 2022 at 19:18
  • \$\begingroup\$ @JoeyB Yep, exactly, and that also pulls down the CP2102's "auto download" line (from DTR/RTS) rendering the auto logic useless. It's the same net. Hence the need for a button or an external MCU... \$\endgroup\$
    – TypeIA
    Commented Jan 12, 2022 at 19:21
  • \$\begingroup\$ If you're willing to destroy your dev board, you could solve it by cutting traces. \$\endgroup\$
    – TypeIA
    Commented Jan 12, 2022 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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