Wrong boot mode detected! The chip needs to be in download mode
Short answer: the tool is talking to your board, but the chip booted into run mode instead of download mode, so it can't be flashed. The automatic reset into download mode didn't happen — hold BOOT (IO0), tap RESET/EN while holding, then release BOOT, and flash again.
The full message is:
A fatal error occurred: Wrong boot mode detected (0xXX)! The chip needs to be in download mode.What it means
From the official esptool docs: "Communication with the chip works (the ROM boot log is detected), but it is not being reset into the download mode automatically." So this is not a cable or driver fault — the serial link is fine. The chip simply wasn't in download mode when flashing began.
Fixes
- Enter download mode manually. Hold
BOOT/IO0, press and releaseRESET/ENwhile still holdingBOOT, then releaseBOOT. Start flashing immediately. - ESP32-S2 / ESP32-S3 with native USB. These often have no auto-reset over USB: hold
BOOT, plug in USB (or tapRESET) while holding, then release. A new USB device appears — that's download mode. - Check the auto-reset circuit. The official docs attribute repeated occurrences to faulty or absent
DTR/RTSauto-reset circuitry; the manualBOOT+RESETsequence bypasses it. - Remove anything on
IO0. A peripheral pullingIO0at boot can force the wrong boot mode.
Button names and timing vary by board — see the per-device notes on each device page.
Related: Timed out waiting for packet header — the same root cause when the board sends nothing back at all.
Sources
- Espressif esptool docs — "Wrong boot mode detected" troubleshooting (official: the exact string, the "not reset into download mode automatically" explanation, and the manual-reset fix).
Checked 2026-07.