Chat freely about anything...

User avatar
By uhrheber
#14544 Is there any explanation of the meaning of the boot mode and rst cause in the startup message?
And: Can I read the values after startup from my code?

So far I found out that a normal power on reset gives 'rst cause:1, boot mode:(3,0)' and a wakeup from deep sleep gives 'rst cause:2, boot mode:(3,7)'.

Is there a list of all possible values with explanation?
User avatar
By HermannSW
#20668 Hi,

found a partial answer just now:
"In the bootup message 'boot mode:(x,y)' three low bits of x are {MTDO, GPIO0, GPIO2}."
https://github.com/esp8266/esp8266-wiki/wiki/Boot-Process#esp-boot-modes

So "…boot mode:(3,…" means boot from SPI flash.

Hermann.
User avatar
By smartynov
#31676 I was googling for it extensively last night. The information is somewhat fragmented, but here is my conclusion:

  • rst cause:1 – normal boot after power-on
  • rst cause:2 – reboot by reset button/pin
  • rst cause:4 – reboot caused by watchdog timer

Using latest NodeMCU firmware you can get "rst cause" value in lua code by callling node.bootreason()