Hi all, noticed this on a D1 mini with ESP8266EX - is it just me or is?
This sequence follows a hard reset (via RTS pin)
>>> machine.reset_cause()
6
>>> machine.HARD_RESET
6
>>> machine.reset()
MicroPython v1.11-8-g48dcbbe60 on 2019-05-29; ESP module with ESP8266
Type "help()" for more information.
>>> machine.reset_cause()
4
>>> machine.SOFT_RESET
4
>>> machine.WDT()
<WDT>
>>>
MicroPython v1.11-8-g48dcbbe60 on 2019-05-29; ESP module with ESP8266
Type "help()" for more information.
>>> machine.reset_cause()
3
>>> machine.WDT_RESET
1
It would seem that machine.WDT_RESET should be 3 - is it just my variant of this chip or a mistake in the library?
WDT reset cause incorrect for ESP8266EX
Re: WDT reset cause incorrect for ESP8266EX
If you look up the ESP headers, the definitions are:
Code: Select all
enum rst_reason {
REASON_DEFAULT_RST = 0,
REASON_WDT_RST = 1,
REASON_EXCEPTION_RST = 2,
REASON_SOFT_WDT_RST = 3,
REASON_SOFT_RESTART = 4,
REASON_DEEP_SLEEP_AWAKE = 5,
REASON_EXT_SYS_RST = 6
};
Can you send a PR to add this?