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.
Thanks
[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
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.
Re: system_get_rst_info() odd behaviour in SDK1.4
Postby ESP_Faye » Fri Oct 16, 2015 9:58 am
Hi,
Please have a try with the attachment, replace the corresponding libs in esp_iot_sdk_v1.4.0
Thanks for your interest in ESP8266 !
Please have a try with the attachment, replace the corresponding libs in esp_iot_sdk_v1.4.0
Thanks for your interest in ESP8266 !
- Attachments
-
- system_get_rst_info_patch.zip
- (139.87 KiB) Downloaded 444 times
[RESOLVED] system_get_rst_info() odd behaviour in SDK1.4
Postby nver » Fri Oct 16, 2015 1:28 pm
Hi,
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
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 83 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.