Fix ESP8266 stuck on “boot mode:(1,6)” (or (7,x)) — sketch won't start
The ESP8266 sampled its strapping pins wrong at reset. Mode 1 = GPIO0 (D3) low; 4–7 = GPIO15 (D8) high. Free those pins and the sketch boots.
Community draft — report a mistake
What you see
ets Jan 8 2013,rst cause:2, boot mode:(1,6)
(nothing more — the chip is waiting for an upload)ets Jan 8 2013,rst cause:2, boot mode:(1,6) (nothing more — the chip is waiting for an upload)
At reset the ESP8266 reads three pins, GPIO15, GPIO0 and GPIO2, to decide how to start. The ROM prints the result as the first number in “boot mode:(x,y)”. 3 means boot your sketch from flash. Anything else means one of those pins was at the wrong level.
The boot line is printed at 74880 baud. Read the first number, find the pin that’s wrong, move whatever is connected there to a safe pin, and the board boots normally.
Quick fix — try in order
- 1
Check GPIO0 (D3) is not held low
Mode 1 means GPIO0 was LOW at reset, so the chip entered upload mode. Remove buttons, relay inputs or sensors on D3 and press RESET. On ESP-01, remove the GPIO0-to-GND wire after flashing.
- 2
Check GPIO15 (D8) is low — boot mode 4, 5, 6 or 7
A first number of 4–7 means GPIO15 was HIGH, which selects SD-card boot. D8 must be pulled low at reset; don't use it for a button with a pull-up, or for an SPI CS line on a module with its own pull-up.
- 3
Check GPIO2 (D4) is not pulled low — boot mode 2
GPIO2 must be high at reset. An LED to GND or a module input on D4 can pull it down.
- 4
Use the safe pins
For buttons, relays and sensors, prefer D1, D2, D5, D6, D7. They don't affect booting.
Why it happens
Reading the boot mode number
The first number is built from three pins: GPIO15, GPIO0, GPIO2. Normal flash boot is 3 (GPIO15 low, GPIO0 high, GPIO2 high). 1 = upload mode. 2 = GPIO2 low. 4–7 = GPIO15 high.
Relay modules on D3
Common low-level-trigger relay boards pull their input towards ground through the opto-LED. Wired to D3, they hold GPIO0 low at power-up and the NodeMCU never starts.
Second number (6, 7)
It's an internal value from the ROM about the flash interface. You can ignore it.
Board-specific notes
NodeMCU ESP8266: The FLASH button is GPIO0. If it's stuck or shorted, every reset lands in mode 1. See the NodeMCU page for the boot pins.
Wemos D1 mini: D3 and D4 have pull-ups and D8 has a pull-down on the board; external wiring can still override them. See the D1 mini page.
Did this fix it?
Thanks — that helps us keep this page right.