Notifications
Clear all

ESP32 boards won't flash

8 Posts
2 Users
1 Likes
1,713 Views
klaymon
(@klaymon)
Member
Joined: 4 years ago
Posts: 6
Topic starter  

I have a Sparkfun ESP32 Thing Plus and 2 ESP32-Cams (the chip on these say ESP32-S). None of these boards will flash, and they all throw the Timed out waiting for packet header error. I'm using a FTDI interface to program with (which I've done a loopback test on, so it appears to be working).

On the cam models, I have IO0 tied to GND, and the TX/RX going to the opposite pins on the FTDI. I'm powering the cam board from a separate power supply at 5V. I've held the reset button for varying lengths of time (release when the connecting dots start, hold it until it errors out, everywhere in between).

On the Sparkfun unit, I've tried holding and releasing the 0 and Reset buttons to varying release points. I found something online that said to put a small electrolytic capacitor between EN and GND (no difference). Another person said to try a 10K pulldown resistor on the TX line (nothing).

I have current drivers for the FTDI board (7-5-21) and it is recognized as COM3 on my PC. I've verified that it appears and disappears as it is plugged in and unplugged.

I've tried using different board selections in the IDE with no change. Also changed the COM port baud rate around (all the way down to 9600).

I even tried using VSCode just in case it was an IDE issue. No change. I hooked up a scope to the TX/RX lines just to verify something was actually happening. I have UART decoding turned on and I'm getting pulses on the TX line from the FTDI, but zero on the RX to the FTDI.

I'm out of ideas. I can flash standard Arduinos with no issue, but the ESP32 boards just refuse.

 

Keith


   
Quote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

@klaymon

I had this problem with my ESP32s as well, and only them. It was after I installed a new library although that might have just been a coincidence. The only way I got it to work again was to copy my arduino folder(for a backup) and the libraries that are in the system folder(windows program folder) and completely uninstall then reinstall and set everything back up again. I believe I also did the extra step and deleted all remaining system folders that was left after I uninstalled as well(Your project folder that is probably in Documents, Program Files (x86), AppData in user folder(in Local but I would check the others as well)). I never replaced the old libraries because I never needed them and I was playing it safe. But reinstalling did help and VSC worked after that too. VSC uses some of the same resources as Arduino IDE. It is probably driver related.

 

You might also try uninstalling the driver before the reinstall.

 

For the ESPCam, open the serial monitor and with the D0 and ground tied together and after pressing the reset button, you should see a message that says it is waiting for program(something like that at least) in the serial monitor(Done in that order). Do you see that?

 

The more info the better so...

What OS are you running?

Arduino IDE setting:

Upload Speed?

CPU Frequency?

Flash frequency?

Flash mode?

What programmer is selected? 

What version of Arduino IDE?

Have you installed the new Beta version? (I would never recommend to do this but it could be a problem)

Have you installed the Arduino IDE 2.0 Beta? (I would not recommend this but if reinstall does not work, it's worth a try)


   
ReplyQuote
klaymon
(@klaymon)
Member
Joined: 4 years ago
Posts: 6
Topic starter  

Nothing in the serial monitor after following those steps.

  • Windows 10
  • Arduino IDE version 1.8.13
  • 240 MHz (WiFi/BT)
  • Tried both 80 and 40 MHz
  • Tried both QIO and DIO per another post I found somewhere
  • The IDE says "no programmers available for this board" (is this my issue?)
  • I currently have my COM port in Windows setup for 115200, 8, N, 1. I don't see a baud rate in the IDE when I have the cam boards selected, except in the serial monitor and it shows 115200.

I have not tried any uninstalling or beta versions yet, but I'm down to try it.

I've tried a couple of different VCP drivers, but it seems to me the thing that Windows needs to see is the FTDI board, which it does.

This post was modified 3 years ago by klaymon

Keith


   
ReplyQuote
klaymon
(@klaymon)
Member
Joined: 4 years ago
Posts: 6
Topic starter  

Uninstalled the IDE and deleted all leftover folders. Reinstalled 1.8.15. No change. VSCode still doesn't work either. Uninstalled the COM port and reinstalled drivers. Nothing.

Keith


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 
Posted by: @klaymon

The IDE says "no programmers available for this board" (is this my issue?)

That's normal. If I remember correct it would show something but a few updates back it just blanks it out. I think it was about the time ESP was officially added. ESP only accepts Serial over bootloader so that is fine.

 

Everything looks normal in the setting you provided.

Posted by: @klaymon

Uninstalled the IDE and deleted all leftover folders. Reinstalled 1.8.15. No change. VSCode still doesn't work either. Uninstalled the COM port and reinstalled drivers. Nothing.

I would suggest manually reinstalling the CP210X USB to UART Bridge VCP Drivers. If you try V10.1.10 and that does not work, try V6.7. Just in case it was windows update the messed it up.

In case you didn't try this simple thing of trying a different USB port and different cable, try that as well. I assume you already did that though.


   
ReplyQuote
klaymon
(@klaymon)
Member
Joined: 4 years ago
Posts: 6
Topic starter  

The Silicon Labs drivers are not compatible with my FTDI board (crashes the system). I have been using the drivers here: https://ftdichip.com/drivers/vcp-drivers/

Plus I would think if this was a driver issue, the FTDI board wouldn't work at all. It works with Arduinos.

I tried every port on my PC and different cables. Just doesn't make any sense. I could see if this was one board. I'd chalk it up to that board being bad maybe, but 3 of them? Weird.

 

Keith


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

@klaymon

Have you tried programing the Sparkfun ESP32 Thing Plus through the Micro-B USB? Same issue?

 

Did you first install the ESP32 way back when you had to do it manually or through the Arduino IDE?

 

You could try to install it yourself outside of Arduino IDE. https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/ Install the tool chain and maybe ESP-IDF and reinstall the VSC extension and see if it works in VSC(I would uninstall all extensions that has to do with Arduino).


   
ReplyQuote
klaymon
(@klaymon)
Member
Joined: 4 years ago
Posts: 6
Topic starter  

UPDATE: Well, I got it working. I took a look at the wiring Bill showed in the ESP32-CAM article and found my problem. He is running the power to the specific labeled pin (5V or 3V3). I was running it to the VCC pin (and it seemed to be powering up because the flash LED was turning on). I made the assumption that the VCC pin was the input and the other 2 pins were voltage out. Guess not. Connected the FTDI to the 5V pin and the serial monitor immediately sent a message stating it was waiting for download. Sketch loaded on the first try.

Thanks for all that gave me input. I guess it was my not being familiar with the pinout completely that was screwing me up.

Keith


   
MadMisha reacted
ReplyQuote