[ESP8266] Reset causes and Boot mode

ESPRESSIF|2021. 1. 16. 08:38

When ESP8266 is booting up, ROM code will print out as above data.

This message describes reset cause and boot mode, and it comes from first stage ROM boot.

so, no matter what ESP8266 has firmware or not, this message must print out. otherwise, there should be hardware issue. 

 

1. Reset cause 

- rst cause : 0   -- Undefined
- rst cause : 1   -- Power reboot
- rst cause : 2   -- External reset or Wake up from deep sleep
- rst cause : 4   -- Hardware WDT reset 

 

The reboot state will not change after software WDT reset or software reset. For example, when the first reset is caused by a power reboot, the rst cause number is 1. After software reset, the rst cause number will still be 1.

 

2. Boot mode.

ESP8266 also prints out Boot mode. 

This is related with Boot strap pin level. it helps to check pin mode of three GPIOs.

 

boot mode : (m,n)

m : the sate of three GPIO

n : the location of the boot file used

 

value of m

three GPIO : GPIO0, GPIO2, GPIO15, please refer to below boot strap pin information. 

0 -> ( logic LOW) = 0 Volt            1 -> (Logic HIGH) = 3.3 volt

Example: 

- boot mode (1, x) - UART boot, this is Firmware download mode

- boot mode (3, x) - GPIO0 is high, this is normal f/w boot

- boot mode (5, x) - GPIO15 is high, this is SDIO slave boot

 

the value of n

Value of “n”SD_sel != 3SD_sel == 3

0

Remapping

_

1 UART boot _
2 Jump boot _
3 Flash boot _
4 SDIO LowSpeed   V2 IO UART1 booting
5 SDIO HighSpeed   V1 IO UART1 booting
6 SDIO LowSpeed   V1 IO UART1 booting
7 SDIO HighSpeed   V2 IO UART1 booting

3. Bootstrap pin

  GPIO0 GPIO2 GPIO15
Normal Flash boot 1 No matter 0
UART download mode
(Firmware download)
0 0 no matter
SDIO slave boot 0 0 1
* SDIO slave boot : It is a special purpose. normally, ESP8266 doens't support this mode. If you need to use this mode, you must check your hardware design. only ESP-WROOM-S2 is supporting this mode.