[RESOLVED]system_get_rst_info() odd behaviour in SDK1.4


[RESOLVED]system_get_rst_info() odd behaviour in SDK1.4

Postby nver » Wed Oct 14, 2015 10:51 pm

Hi Espressif,

I am using SDK1.4 and trying "struct rst_info *restart_info = system_get_rst_info()" in my code and have noticed a potential bug in getting the correct restart reason.

Below was my sequence of reboots:

1.Apply power to the module : restart_info->reason = 0 (as expected)
2. then call system_restart() : restart_info->reason = 4 (as expected)
3. then do external reset i.e. pin EXT_RSTB to GND : restart_info->reason = 6 (as expected)
4. all subsequent calls to system_restart() returns restart_info->reason = 6 (NOT as expected, must return 4)

Looks like restart_info->reason gets stuck once it is 6 until the module is power cycled.

Can you please investigate this. its 100% reproducible on my Olimex MOD-WIFI-ESP8266-DEV module.


User avatar
Posts: 131
Joined: Tue Jun 16, 2015 1:09 pm
Location: Fort Worth, Texas, USA

Re: system_get_rst_info() odd behaviour in SDK1.4

Postby kolban » Wed Oct 14, 2015 11:32 pm

+1 on this question. I had noticed this and assumed that I had broken my code ... but this is exactly the symptom set I see after having moved to SDK 1.4.

Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: system_get_rst_info() odd behaviour in SDK1.4

Postby ESP_Faye » Fri Oct 16, 2015 9:58 am


Please have a try with the attachment, replace the corresponding libs in esp_iot_sdk_v1.4.0

Thanks for your interest in ESP8266 !
(139.87 KiB) Downloaded 248 times


[RESOLVED] system_get_rst_info() odd behaviour in SDK1.4

Postby nver » Fri Oct 16, 2015 1:28 pm

Many thanks. the patch fixed the issue. So far I have only tested the patch for restart reason, 0, 4 and 6 and works as expected.

Thanks again :)

Who is online

Users browsing this forum: No registered users and 4 guests