-->
Page 1 of 2

rst cause and boot mode, are they documented anywhere?

PostPosted: Wed Apr 15, 2015 1:16 am
by uhrheber
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?

Re: rst cause and boot mode, are they documented anywhere?

PostPosted: Tue Jun 16, 2015 3:46 pm
by balywin
Very good questions, but answers needed. Unfortunately there is silence only.

Re: rst cause and boot mode, are they documented anywhere?

PostPosted: Wed Jun 17, 2015 3:07 am
by HermannSW
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.

Re: rst cause and boot mode, are they documented anywhere?

PostPosted: Sun Oct 18, 2015 3:22 pm
by smartynov
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()