BLE Deep Sleep

Deepak
Posts: 12
Joined: Sat Jul 01, 2017 10:01 am

BLE Deep Sleep

Postby Deepak » Wed Oct 11, 2017 8:57 am

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

ESP_Sprite
Posts: 9759
Joined: Thu Nov 26, 2015 4:08 am

Re: BLE Deep Sleep

Postby ESP_Sprite » Wed Oct 11, 2017 10:08 am

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.

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: BLE Deep Sleep

Postby ESP_igrr » Thu Oct 12, 2017 12:54 am

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.

esp-funs
Posts: 1
Joined: Thu Oct 12, 2017 11:33 am

Re: BLE Deep Sleep

Postby esp-funs » Thu Oct 12, 2017 11:42 am

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 113 guests