Uploading code to ESP32 through serial suddenly stopped working
Posted: Sun Jan 15, 2023 2:17 pm
Hello,
I created a simple breakout board for ESP32 module, it's just the module itself with some filtering caps on power rail and hooked it up to my FTDI uart to serial converter like so
RX -> TX
TX -> RX
GND -> GND
3.3 -> 3.3V
Then yesterday I tried uploading a simple blink sketch with serial print to the ESP32 module, while the arduino ide was connecting to the ESP32 i connected pin0 to ground and tapped the EN pin to ground. To enter boot mode. It worked without any issues and the code uploaded. I did this several times.
Today, when I tried uploading code once more it just... doesn't work anymore for some reason.
If i do nothing with EN and boot pins I get "Failed to connect to ESP32: No serial data received."
If i ground BOOT and tap the EN pin to ground, like before when it worked, I get either that same error or this one " Failed to connect to ESP32: Wrong boot mode detected (0xb)! The chip needs to be in download mode."
I don't understand why it stopped working, when I didn't change anything.
I tried rebooting my computer but that didn't help.
To make 100% sure it wasn't the FTDI module or its drivers, I swapped it for arduino UNO and tired using it (the UNO) as a serial programmer instead, with exactly the same results.
I know the ESP32 module itself isn't dead because the sketch I uploaded to it yesterday is working just fine and blinking the led, and if I open the serial monitor in Arduino IDE i can see the Serial.print() messages the ESP32 is printing into it.
I noticed that when I pull boot to GND and then tap EN to gnd to cause reset, the serial monitor starts outputting this over and over again:
11:46:45.002 -> rst:0x10 (RTCWDT_RTC_RESET),boot:0xb (HSPI_FLASH_BOOT)
11:46:45.002 -> flash read err, 1000
11:46:45.002 -> ets_main.c 371
11:46:45.378 -> ets Jun 8 2016 00:22:57
I'm not sure if that is supposed to happen or not. Once I disconnect BOOT pin from GND it just starts executing the code normally.
Attached image are the only components connected to the ESP32 apart from the programmer itself. (The R5 is actually 200ohms)
I created a simple breakout board for ESP32 module, it's just the module itself with some filtering caps on power rail and hooked it up to my FTDI uart to serial converter like so
RX -> TX
TX -> RX
GND -> GND
3.3 -> 3.3V
Then yesterday I tried uploading a simple blink sketch with serial print to the ESP32 module, while the arduino ide was connecting to the ESP32 i connected pin0 to ground and tapped the EN pin to ground. To enter boot mode. It worked without any issues and the code uploaded. I did this several times.
Today, when I tried uploading code once more it just... doesn't work anymore for some reason.
If i do nothing with EN and boot pins I get "Failed to connect to ESP32: No serial data received."
If i ground BOOT and tap the EN pin to ground, like before when it worked, I get either that same error or this one " Failed to connect to ESP32: Wrong boot mode detected (0xb)! The chip needs to be in download mode."
I don't understand why it stopped working, when I didn't change anything.
I tried rebooting my computer but that didn't help.
To make 100% sure it wasn't the FTDI module or its drivers, I swapped it for arduino UNO and tired using it (the UNO) as a serial programmer instead, with exactly the same results.
I know the ESP32 module itself isn't dead because the sketch I uploaded to it yesterday is working just fine and blinking the led, and if I open the serial monitor in Arduino IDE i can see the Serial.print() messages the ESP32 is printing into it.
I noticed that when I pull boot to GND and then tap EN to gnd to cause reset, the serial monitor starts outputting this over and over again:
11:46:45.002 -> rst:0x10 (RTCWDT_RTC_RESET),boot:0xb (HSPI_FLASH_BOOT)
11:46:45.002 -> flash read err, 1000
11:46:45.002 -> ets_main.c 371
11:46:45.378 -> ets Jun 8 2016 00:22:57
I'm not sure if that is supposed to happen or not. Once I disconnect BOOT pin from GND it just starts executing the code normally.
Attached image are the only components connected to the ESP32 apart from the programmer itself. (The R5 is actually 200ohms)