Project

General

Profile

How to fix "A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode."?

Added by Parth Maheshwari (พาร์ท) over 1 year ago

This error will come up in the diagnostic viewer during the last phase of flashing the code View

The reason behind this error is that some ESP32 boards don't go into flash/download mode automatically when you try to deploy new code to them. If you are facing this error, your board may be one of them.

There is a simple solution (but you will have to do this every time you want to deploy code to this ESP32 board of yours), and there is a permanent solution.

Simple solution: As soon as you see the message "Waijung 2: Downloading to the target" (you will see this message towards the end of the build process as this is the last step), please hold down on the BOOT/FLASH button on your ESP32 until the build procedure is complete . This will restart the chip and put it into download mode and fix the problem.

Permanent solution - you can try soldering a 10 uF electrolytic capacitor between the EN and GND pins of your ESP32.