So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By teo8976
#78366 Hi,

On a SparkFun ESP8266 Thing Dev, I need my application to go to Deep Sleep for periods in the order of 12, 24 hours or so; however ESP.deepSleepMaxTime() returns the equivalent of around 3 hours and a half, so that's the maximum I can achieve with ESP.deepSleep().

I know there are a number of alternatives, like storing the desired sleep time into the EEPROM, doing deepsleep for the maximum time, and going to sleep again immediately if needed.
That's just inconvenient for my particular application for a series of reasons.

So, I'd like to know whether there is any possibility, even tinkering with the libraries if necessary, to do true deepsleep in one single interval, longer than the current maximum. Obviously, I don't need microsecond accuracy. I don't even need second accuracy.

So I wonder: is the current limit a hardware, or software limitation? If it's the former, I guess it's unlikely there's anything I can do. If it's software, is there any hack that would allow me to do that? Like, for example, maybe the limitation has to do with the microsecond precision (i.e. representing huge numbers of microseconds), and there's a way to rewrite some lower-level function to allow longer maximum times with less precision??

If the answer is no, you can't do that, I'll be happy with that answer, and will go with the workarounds, doing several sleeps in a row. I already know how to do that.

Thanks in advance.