Page 1 of 1

deep sleep behavior

Posted: Tue Nov 15, 2016 11:15 am
by lynxIce
Hi!
Anyone having an idea what is happening with the module during deep sleep? will it wake on interrupt? is the state after a wake up equal to the state after a system-reset? Or will it continue where it last left of?

I'm kind of confused of how the deep sleep work, hope someone can spread some light!

Re: deep sleep behavior

Posted: Tue Nov 15, 2016 11:13 pm
by kolban
Does this documentation page help any?

http://esp-idf.readthedocs.io/en/latest ... -stub.html

Re: deep sleep behavior

Posted: Wed Nov 16, 2016 1:36 am
by WiFive
Wake stub helps for what to do after wakeup but not how to set triggers for wakeup itself. The RTC subsystem is capable of many things not to mention the LPC.

Re: deep sleep behavior

Posted: Thu Nov 17, 2016 10:33 am
by davidi
I played around a bit with the deep sleep mode. But sofar I'm also missing good documentation.
will it wake on interrupt? is the state after a wake up equal to the state after a system-reset? Or will it continue where it last left of?
If I understand it correctly during deep sleep only the RTC is on and only the RTC memory will remain powered. The RTC can wake up the rest of the system based on: A timer expiring, a configured level on one of the RTC GPIO's or by the ULP-coprocessor. Since most memory is shut down the main CPU will start as if it was reset. But the ESP-IDF does have to option to run a stub upon wake from deep sleep, as already pointed out above. And anything you save in the RTC memory will be retained over deep sleep.

I did manage to get the module into deep sleep mode and out of deep sleep by timer. But I'm currently stuck trying to wake on GPIO. See this post

It would be great if someone from Espressif could provide a little bit more information, or the missing documentation(like the missing Power Management chapter referenced by the TRM;) ).

Re: deep sleep behavior

Posted: Mon Jul 03, 2017 12:33 pm
by ginodecock
Hi,

Your sample with deep sleep stub combined with timer would be usefull.

Thanks,