Chat freely about anything...

User avatar
By btidey
#87852 My understanding was that 0 should have disabled the timer and would activate the wake up pulse. Although I have not tested that myself as when I use it I would normally allow it to wake up at an interval, decide there was nothing to be done and shut down again. If the interval was say 1 hour then this would have negligible extra current drain.

Are you sure nothing else can activate the reset? How have you got GPIO16 RST connected?
User avatar
By davydnorris
#87856
sblantipodi wrote:
davydnorris wrote:Remove the connection between the reset and GPIO - then when you tell it to sleep for any amount of time it will not wake up


but sometimes I need to make it sleep and sometimes I need to power it off.
any solution to the problem?


So really you want to do two different things here:
- sleep, in which case you can use the regular deep sleep routine
- shutdown, in which case you want to shut down the ESP

The NonOS documentation says that system_deep_sleep(0) should not set a wake up timer at all, and should sleep forever until you supply an external pulse on the RST pin. This is still deep sleep though - if you actually want to shut the unit down then you can toggle GPIO0. Have a look at this thread.

https://www.esp8266.com/viewtopic.php?f=11&t=4458
User avatar
By sblantipodi
#87863
btidey wrote:My understanding was that 0 should have disabled the timer and would activate the wake up pulse. Although I have not tested that myself as when I use it I would normally allow it to wake up at an interval, decide there was nothing to be done and shut down again. If the interval was say 1 hour then this would have negligible extra current drain.

Are you sure nothing else can activate the reset? How have you got GPIO16 RST connected?


pretty syre that no one reset the ESP