Managing RTC drift while in ESP32C3 deep sleep using internal oscillator?

260 Views Asked by At

I'm using the internal oscillator (136kHz on ESP32C3) as it's the lowest power option for deep sleep. I don't have an external 32kHz crystal.

I wake the unit on the hour, do some stuff for a few seconds, then deep sleep till the next hour usign the internal 136kHz oscillator to keep RTC during sleep. I see the wake up time might drift by up to +/-20s per hour. This seems strongly temperature-dependent, so even calibrating every wake (rtc_slow_cal against the 40MHz XTAL) doesn't help much. Even running the ESP32C3 with wifi on for 20s I see the oscillator drift by +/-1% from thermal effects of the wifi power consumption warming up the module.

How do others manage this? (Without resorting to a higher-accuracy clock source)

The unit calibrates the slow RTC clk against the 40MHz XTAL every hour. Over the following hour the temperature affects the oscillator accuracy.

0

There are 0 best solutions below