8ccb2a4990
Small changes to clock calibration value will cause increasing errors the longer the device runs. Consider the case of deep sleep, assuming that RTC counter is used for timekeeping: - before sleep: time_before = rtc_counter * calibration_val - after sleep: time_after = (rtc_counter + sleep_count) * (calibration_val + epsilon) where 'epsilon' is a small estimation error of 'calibration_val'. The apparent sleep duration thus will be: time_after - time_before = sleep_count * (calibration_val + epsilon) + rtc_counter * epsilon Second term on the right hand side is the error in time difference estimation, it is proportional to the total system runtime (rtc_counter). To avoid this issue, this change makes RTC_SLOW_CLK calibration value persistent across restarts. This allows the calibration value update to be preformed, while keeping time after update same as before the update. |
||
---|---|---|
.. | ||
aes.h | ||
bigint.h | ||
cache.h | ||
crc.h | ||
efuse.h | ||
ets_sys.h | ||
gpio.h | ||
libc_stubs.h | ||
lldesc.h | ||
md5_hash.h | ||
miniz.h | ||
queue.h | ||
rtc.h | ||
secure_boot.h | ||
sha.h | ||
spi_flash.h | ||
tbconsole.h | ||
tjpgd.h | ||
uart.h |