esp-idf/components/esp32/include/rom
Ivan Grokhotkov 8ccb2a4990 esp32: make time monotonic across resets
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.
2017-06-16 12:06:04 +08:00
..
aes.h Merge remote-tracking branch 'origin/master' into feature/mbedtls 2016-09-13 16:31:48 +08:00
bigint.h Merge remote-tracking branch 'origin/master' into feature/mbedtls 2016-09-13 16:31:48 +08:00
cache.h component/esp32 : do more fix of dualcore bug 2017-05-12 15:41:51 +08:00
crc.h header files: clean up 2016-09-12 17:47:50 +08:00
efuse.h bootloader: Add QIO support for ESP32-D2WD SPI flash 2017-04-13 17:55:47 +10:00
ets_sys.h deep sleep: fix regression due to moving ets_update_cpu_frequency into IRAM 2017-01-12 14:15:25 +08:00
gpio.h rom/gpio.h: Use new GPIO_PIN0_REG register name 2016-09-16 09:43:52 +10:00
libc_stubs.h Initial public version 2016-08-17 23:08:22 +08:00
lldesc.h Initial public version 2016-08-17 23:08:22 +08:00
md5_hash.h md5_hash.h: Replace outdated use of c_types.h with stdint 2016-09-01 08:58:29 +10:00
miniz.h Initial public version 2016-08-17 23:08:22 +08:00
queue.h Initial public version 2016-08-17 23:08:22 +08:00
rtc.h esp32: make time monotonic across resets 2017-06-16 12:06:04 +08:00
secure_boot.h Refactor existing bootloader common functionality into bootloader_support component 2016-11-02 17:58:41 +11:00
sha.h mbedTLS SHA acceleration: Allow concurrent digest calculation, works with TLS 2016-11-22 20:42:38 +11:00
spi_flash.h bootloader: Add QIO support for ESP32-D2WD SPI flash 2017-04-13 17:55:47 +10:00
tbconsole.h Initial public version 2016-08-17 23:08:22 +08:00
tjpgd.h Initial public version 2016-08-17 23:08:22 +08:00
uart.h uart_tx_wait_idle: fix issue with last character not transmitted 2016-12-08 01:42:37 +08:00