Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Maxim Yachnyy
#17015
Makuna wrote:What accuracy are you looking for out of your RTC?

Most uControllers are not accurate to be used for RTC of 1second a day error due to many reasons. Temperature changes effect the crystal and thus the clock; so powering down that little cpu heater can effect the crystal. Often the circuit and crystal weren't "designed" to be highly stable in the first place. Further, most of the sleep features were designed for power saving not cycle accuracy. WDT are notoriously inaccurate.


One second a day accuracy is quite enough for me. ESP uses (as I suppose) main crystal for RTC. As main crystal is used to generate wifi frequency range, it is quite accurate for me.
User avatar
By eriksl
#17027
Maxim Yachnyy wrote:
eriksl wrote:IIRC there is a timer that remains ticking even in deep sleep. Are you sure you need the deep sleep? ;-)

The only timer that is ticking in deep sleep is RTC. But it is reset while system is starting after deep sleep, so I can't read it's value after sleep to obtain real sleep time. And yes, I need deep sleep.

Okay, I see, thanks for the explanation.
User avatar
By Maxim Yachnyy
#17401 If somebody is interested in real numbers, here they are (measured using oscilloscope):
Calling system_deep_sleep( 30000000 ) results in sleep time of 28.68 seconds.
Calling system_deep_sleep( 10000000 ) results in sleep time of 9.52 seconds.