-->
Page 1 of 2

SLEEP restrictions?

PostPosted: Thu Apr 13, 2017 8:11 am
by PeterN
I made a WordClock with 100 neopixels. Wanted to sent the clock to sleep for the late night hours. Regardless of my value for the seconds ( e.g. sleep 21600 ), sleep seems to do the job only for about 1 hour and then wakes up the machine.

Can not find information about a potential restriction for the internal countdown-timer

Re: SLEEP restrictions?

PostPosted: Fri Apr 14, 2017 11:42 am
by PeterN
I found some hints that the Internal counter limits the deep-sleep-time:

The ESP is a 32-bit processor and the maximum value for a 32-bit unsigned integer is 4294967295 or 0xffffffff, or 71 minutes. - See more at:[ url] viewtopic.php?f=32&t=7867#sthash.JZLvuhSJ.dpuf[/url]

Re: SLEEP restrictions?

PostPosted: Sat Apr 15, 2017 8:46 am
by martinayotte
This limit is well known !
To get longer deepSleep(), you need to have a counter in RTCRAM, and when wake up from deepSleep, decrement the counter, and go back quickly in deepSleep if that counter hasn't reach zero.

Re: SLEEP restrictions?

PostPosted: Sun Apr 16, 2017 6:20 am
by PeterN
Thanks for the hint, to use SLEEP in a loop with a counter in external memory.

It would help if the exact maximum number of seconds to be used with SLEEP could be mentioned in the dokumentation. This for all other peope to find this well known limitation faster than I did.