With SDK v1.3.0 I'm using the system_deep_sleep() call to put the device to sleep for a short period of time and using the XPD pin tied to RST (via a diode) to reset the device at the end of the sleep period. The app calls system_get_rst_info() when it runs and the 'reason' member has the value 6 (external reset) after wakeup. I expected to see the value 5 (deep sleep wakeup). Is 6 the expected value with this arrangement? If so, how can I use the XPD output to wake up the device and get a reason value of 5?
As a side note, I get a reason value of 0 on power-up and a reason value of 3 if I put the code in a tight loop. These are both expected and demonstrate that I'm calling system_get_rst_info() correctly.
system_get_rst_info() reason value with deep sleep wakeup
Re: system_get_rst_info() reason value with deep sleep wakeup
Postby ESP_Faye » Tue Aug 25, 2015 12:00 pm
Hi,
Thanks for your valuable advice !
We will optimize the SDK to get a reason value of 5 while using the XPD output to wake up from deep-sleep.
Please have a try with this new lib based on esp_iot_sdk_v1.3.0.
Thanks for your valuable advice !
We will optimize the SDK to get a reason value of 5 while using the XPD output to wake up from deep-sleep.
Please have a try with this new lib based on esp_iot_sdk_v1.3.0.
- Attachments
-
- libmain_1.3.0_deepsleep_reason.zip
- (48.48 KiB) Downloaded 442 times
Re: system_get_rst_info() reason value with deep sleep wakeup
Postby dkinzer » Tue Aug 25, 2015 11:24 pm
That works, thanks. However, there is much more output on UART0 using this libmain.a. Upon calling system_deep_sleep, I see this:Espressif_Faye wrote:Please have a try with this new lib based on esp_iot_sdk_v1.3.0.
bcn 0
del if1
usl
sul 0 0
deep sleep 5s
Then, upon awakening, there a lot of "garbage" emitted, more than normal. The terminal program monitoring UART0 output is set to 230400 baud. I can eliminate the legible part quoted above by installing a do-nothing print output function (using os_install_putc1()) but, of course, the unintelligible part remains. Does this libmain.a have extra debugging output enabled?
Don Kinzer
Beaverton, OR, USA
Beaverton, OR, USA
Who is online
Users browsing this forum: No registered users and 27 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.