A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
Posted: Tue Oct 19, 2021 5:16 pm
I have a custom board where I am using an ESP32 Wroom module. I am not able to flash code via serial communication. I am using FTDI232 USB to UART for serial communication. I am able to get serial messages in my serial monitor which mean there is no issue in serial wires.
I have attached a capacitor and a pull up resistor on EN line. GPIO0 is also pulled to GND during flashing the code. Please see the attached rough schematic of my system and timing diagram for more information. I have jumped my EN and GPIO0 line from board to a breadboard where I am manually jumping the EN & GPIO 0 wires to GND. This is just to be sure that I am pulling down the signals while booting and there is no noise or sudden voltage fluctuation while toggling the signals.
For extra precaution I have also pulled up or pulled low other strapping pins as shown in schematic.
While uploading the code I pull down first GPIO 0 line and then EN line to GND and later when I see message on my Arduino IDE terminal I pull up the EN line and continue pressing the GPIO0 line to GND until the Arduino IDE display error message:
I know I can enter my ESP32 into program mode as I see following message on my serial monitor. Whenever my GPIO 0 is low and then when I toggle the EN signal from 1 (high) to 0 (low) and then back to 1(high). It shows following message which is good
I am not sure where I am doing mistake.
I have attached a capacitor and a pull up resistor on EN line. GPIO0 is also pulled to GND during flashing the code. Please see the attached rough schematic of my system and timing diagram for more information. I have jumped my EN and GPIO0 line from board to a breadboard where I am manually jumping the EN & GPIO 0 wires to GND. This is just to be sure that I am pulling down the signals while booting and there is no noise or sudden voltage fluctuation while toggling the signals.
For extra precaution I have also pulled up or pulled low other strapping pins as shown in schematic.
While uploading the code I pull down first GPIO 0 line and then EN line to GND and later when I see
Code: Select all
'Connecting........_____'
Code: Select all
'A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header'
Code: Select all
'rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download'