Chat freely about anything...

User avatar
By RogerClark
#6160 Hi,

I'm trying to use system_deep_sleep() , (specifically sleep for 30 seconds for test purposes), and looking at the serial port, I get the message

deep sleep 30s

in response to calling

system_deep_sleep(30*1000*1000);

Then after just under 30 secs' I get some jibberish on the serial port

rllœž|Œlà|Œlìb|Ž‚ì’r’blŽbŒònnžlnnœâìbplblrl‚rò’nàbânbpü

Which is the same sort of jibberish that I get if I reset the module

Edit. I'm using esp_iot_sdk_v0.9.4_14_12_19, which as far as I can tell is the latest version from Espressif's BBS

But after that the module doesn't appear to run the user code etc.

Has anyone successfully used system_deep_sleep() ??
User avatar
By RogerClark
#6223 @Athena

Thankyou.

I had read something about GPIO16 aka XPD_DCDC needing to be connected to Reset. But I was not sure if this was necessary.

I still don't quite understand why this is necessary. I presume that when the device wakes from deep sleep, there is something in the OS which sets or clears some internal flag and then tells GPIO16 to go LOW, which then causes the module to be reset.
This may have been discussed elsewhere on the forum, I'm not sure...

I'm not sure why the device can't simply just do system_restart(); when it wakes up.

Anyway, I'm using an ESP-12 module which has GPIO16 available, so I will connect it to RST probably via a diode, so that I can still use a switch on RST to reset the module.

Thanks again

Roger
User avatar
By dchanym
#27914 Hi Roger,

I'm just a newbie on ESP8266 power saving mode. Appreciate if you can give me some advices on the LIGHT SLEEP:

1. I got confusion about put the light sleep mode. I see the SDK said that we can call API wifi_set_sleep_type() to set the LIGHT SLEEP mode. But, it also said that it will not directly put into LIGHT SLEEP mode. Does it mean ESP8266 will go to LIGHT SLEEP mode automatically if the CPU finished all the activities or processing? Is it correct?

2. If point(1) is correct, where I can put the code into the Arduino sketch (I'm using Arduino IDE) to process the received data? Put the code into loop()? Or, some API(s) will be automatically called after waking up from LIGHT SLEEP mode? If possible, any sample program is available for reference?

3. The last line you mentioned to connect the GPIO16 to RST through a diode. What is the diode model you use? The direction of the diode should be RST --->|--- GPIO16, right?

Many thanks.
Dick

RogerClark wrote:@Athena

Thankyou.

I had read something about GPIO16 aka XPD_DCDC needing to be connected to Reset. But I was not sure if this was necessary.

I still don't quite understand why this is necessary. I presume that when the device wakes from deep sleep, there is something in the OS which sets or clears some internal flag and then tells GPIO16 to go LOW, which then causes the module to be reset.
This may have been discussed elsewhere on the forum, I'm not sure...

I'm not sure why the device can't simply just do system_restart(); when it wakes up.

Anyway, I'm using an ESP-12 module which has GPIO16 available, so I will connect it to RST probably via a diode, so that I can still use a switch on RST to reset the module.

Thanks again

Roger