I recently broke my USB port on ESP 32 ...

enter image description here

... so I need somehow program it. I have this FTDI programmer. ...

enter image description here

I tried to flash it (I pushed boot and EN button together and when Arduino IDE finished compilation and started flashing, I released EN and then boot button.)


ESP 32 VIN ... VCC programmer (3.3 V)

ESP 32 GND ... GND programmer

ESP 32 TX ... RX programmer

ESP 32 RX ... TX programmer

After this attempt I get this error:

enter image description here

I tried to use this programmer to program Arduino nano and it works. Do you have any sugesstions about programming this ESP 32 without USB port?

  • \$\begingroup\$ You may be missing a key connection or initialization, or you may need to disconnect the on-board USB-serial chip. \$\endgroup\$ – Chris Stratton Jul 13 '19 at 17:01
  • \$\begingroup\$ I'm not experienced with ESP32; I bought one and played with one time. I have some experience with ESP8266. I can easily program ESP8266 using an USB-to-serial adapter, BUT, when booting up ESP8266, some pins have to be grounded, and some pins connected to +Vcc. If you connected only Vcc, GND, TX and RX, ESP can't know that you want to write to it, instead of just run the written code. Also, this breakout board probably has connections made in order that the serial data goes to the ESP32 from that little squared chip (near the boot switch), which probably makes USB to serial translation. \$\endgroup\$ – mguima Jul 14 '19 at 1:14
  • \$\begingroup\$ I'm trying the same thing but with no luck (external power source used). You used the rx2/tx2 or rx0/tx0 pins? \$\endgroup\$ – xfze Apr 14 at 13:09
  • \$\begingroup\$ I am used tx0. You need to push boot button then en button while you are still holding boot. After this, click upload in arduino IDE. \$\endgroup\$ – LucasN Apr 14 at 13:42

It's unclear from the image if you have set the FTDI adapter to the correct voltage 5.0V or 3.3V (it should be 3.3V).

I have experience programming bare ESP32 modules in this manner, but never a break-out board like this.

Looking at your log and reading through esptool.py is seems clear that you have communication in both directions, otherwise it should have failed earlier - BUT I would verify this by disconnecting one wire (TX, RX) at a time and try a download, just make sure that the download behavior does indeed change.

How are you powering the ESP32? It looks like you are taking VCC from the FTDI adapter. The ESP32 is a bit power hungrier than many other controllers, are you sure your FTDI adapter is able to power it adequately?

Removing the USB/TTL bridge should not be necessary as it should be passive with no USB connected, and most ESP32 breakout boards include a resistor on the bridge TX output to make sure you can "override" the signal externally, like you are doing now. However, if you keep being unable to program I would remove it or cut the relevant traces just to be sure.

| improve this answer | |
  • \$\begingroup\$ The problem was in powering ESP32. You were right, FTDI adapter wasn't abe to power ESP32. \$\endgroup\$ – LucasN Jul 14 '19 at 14:45

I see your connections and there is a problem.

Uploading code to the ESP32 is not the same as uploading code to an Arduino or ESP8266 where we used only RX and TX pins. To upload code to the ESP32 there are some other pins that are used:

  1. RXD0
  2. TXD0
  3. GPIO 13
  4. GPIO 15
  5. GPIO IO0
  6. EN
  7. VCC
  8. GND
  • FTDI PIN ---------------> ESP32 PIN
  1. CTS -----------------> GPIO 15
  2. RTS -----------------> GPIO 13 AND GPIO IO0
  3. RX -----------------> TXD0
  4. TX -----------------> RXD0
  5. DTR -----------------> EN
  6. VCC -----------------> Vin
  7. GND -----------------> GND

After making these connections you can upload code successfully. Don't forget to press the boot button for a while, when starting to upload code.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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