-->
Page 1 of 1

ESP07 - Deepsleep make it reboot

PostPosted: Tue Aug 28, 2018 9:39 am
by Ilocans
Hi,

I read a lot on internet about deepsleep and I understood that I should connect my RST to GPIO16 to be able to wake up from deepsleep. Some say a wire, other a resistor (470ohm or 1k). I tried both.
However, its seems in my case that when the esp wake up it kind of reboot. It does not continue from where it felt asleep or keep my variables values.
I would like to be able to keep track of certain information when my esp wake up. LIke if I trigger some action or not. What is the best way to do so ?

Thanks for your help,

Re: ESP07 - Deepsleep make it reboot

PostPosted: Wed Aug 29, 2018 1:33 am
by schufti
what you describe is exactly the way it is designed.
"deep sleep" is not like hibernation in windows.
you could check the boot reason for specific action and/or store relevant information in rtc ram.

Re: ESP07 - Deepsleep make it reboot

PostPosted: Wed Aug 29, 2018 3:24 am
by btidey
Depending on what you need to retain, you can either use the EEPROM variable space or the SPIFFS filing system.

I normally use the SPIFFS filing system in my battery deep sleep projects. This works along the lines

Wake up
Load config file from SPIFFS and set 'static' operational values.
Load status file from SPIFFS and set dynamic operational values.
Run the activity required,
Save new dynamic values to status file if anything has changed.
Go to sleep