Hie,
I am developing BLE battery powered device. I want esp32 to put into power saving mode. I am able to force it into deep sleep mode and also able to wake it up from deep sleep mode using timer but as soon as it comes out of this mode it gets reset and reboots again.
I don't want this to happen, I want it to execute the code from where it left before entering into deep sleep. I have also tried writing Wake Stub code but it didn't solve my problem. Is there any way to avoid above situation? I have also found that there are other modes of power saving but I am unable to enter into that mode.
Please help me to find a way out of it.
Thanks
Deepak Patel
BLE Deep Sleep
-
- Posts: 9723
- Joined: Thu Nov 26, 2015 4:08 am
Re: BLE Deep Sleep
Yes, this is what deep sleep does: power off everything but the RTC domain. Main memory also gets powered down, so the processor state is essentially discarded (the 'reset' you mention). At the moment we do not have a suspend method that allows the CPU to continue execution, sorry. What you can do is manually save the state of your application to the RTC memory, where it is kept, then try to recover from that once the deep sleep is over.
Re: BLE Deep Sleep
An alternative to deep sleep is light sleep. It also shuts down most of the chip (including peripherals and CPUs) but preserves memory contents. This means that when the chip wakes up from light sleep, the program will continue execution, instead of starting from scratch.
Re: BLE Deep Sleep
Hi! I totally agreed whith the two replies above,and i had met the situation you said. It's not a bug of hardware design but your understanding of the deep sleep mode. To slove your problem, you may refer to the datasheet of esp32 about power manage and low consume mode.
Who is online
Users browsing this forum: No registered users and 75 guests