Internal RTC & deep sleep?
Posted: Sun Jun 09, 2019 2:28 pm
Has anyone been able to keep time roughly with the internal RTC after going to deep sleep? In my case I'm on the worst situation possible - a battery-powered device that already got a little bit too bulky, goes to sleep infinitely after an interrupt by a sensor sends a pulse to the reset pin, then measures from an accelerometer and writes to a csv in SPIFFS. All of this on an ESP12E.
Thing is, the device will only have a wifi connection once a day, and then has to keep the time for around a day (wouldn't mind a drift of 10 minutes or so, it's mostly to check intervals between deep sleep, and in addition having the rough time at which it was triggered wouldn't be bad at all).
So, the question remains: After looking around in these forums, there's seemingly no way to keep the time after a wake-up. Would love to avoid having to use an external RTC if possible. Is there any workaround for this, or I'm doomed?
On a side note, I think I could use short, 1 minute deep sleeps and a counter on RTC mem, then check reset cause, and determine if the reset was scheduled or because of the sensor. But I would need to reduce the boot time, which is still too long even having wi-fi off (WAKE_RF_DISABLED). Any tips? I think I've seen a modified bootloader with MUCH faster boot times but it had wifi off altogether
Thing is, the device will only have a wifi connection once a day, and then has to keep the time for around a day (wouldn't mind a drift of 10 minutes or so, it's mostly to check intervals between deep sleep, and in addition having the rough time at which it was triggered wouldn't be bad at all).
So, the question remains: After looking around in these forums, there's seemingly no way to keep the time after a wake-up. Would love to avoid having to use an external RTC if possible. Is there any workaround for this, or I'm doomed?
On a side note, I think I could use short, 1 minute deep sleeps and a counter on RTC mem, then check reset cause, and determine if the reset was scheduled or because of the sensor. But I would need to reduce the boot time, which is still too long even having wi-fi off (WAKE_RF_DISABLED). Any tips? I think I've seen a modified bootloader with MUCH faster boot times but it had wifi off altogether