0

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.

tpbedford
  • 1
  • 1
  • 136kHz is really a compromise between accuracy and deep-sleep current. Between the two factors, if you don't mind to have slightly higher deep-sleep current (5uA), you can use the Internal 17.5MHz oscillator, divided by 256 (RTC_CLK_SRC_INT_8MD256) which has better accuracy but higher power consumption, also does not dependent on any external source. – hcheung Aug 30 '23 at 13:09
  • @hcheung Thanks perhaps I'll try the 17.5MHz osc again - I did once and didn't feel it was sufficiently accurate to justify the higher current. Though, maybe I can use that overnight when my device sleeps for longer finding time sync the next day (it turns on wifi occasionally to re-sync, buit that's a power-hungry operation I'd like to do as little as possible) – tpbedford Aug 30 '23 at 21:59

0 Answers0