OVMS3-idf/components
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
..
app_update Enable checks for encrypted flash in OTA 2017-04-11 19:10:26 +08:00
aws_iot AWS IoT Device SDK Support 2017-03-13 17:23:29 +08:00
bootloader bugfix:Fix bug that wdt reset information for CPU1 was not correct 2017-06-05 18:26:14 +08:00
bootloader_support component/soc : move dport access header files to soc 2017-05-09 18:06:00 +08:00
bt component/bt: Fix crash problem while using invalid control parameter 2017-06-07 20:18:36 +08:00
coap coap: Initialise/update the libcoap submodule 2017-01-10 11:12:02 +11:00
cxx cxx: add iostreams test 2017-01-11 15:03:14 +08:00
driver Merge branch 'bugfix/i2s_channel_setting' into 'master' 2017-06-06 14:40:43 +08:00
esp32 esp32: make time monotonic across resets 2017-06-16 12:06:04 +08:00
espcoredump bugfix: fixed path to esptool when there is no compiled python module for it 2017-03-21 13:30:38 +03:00
esptool_py esptool: Update to include ESP32-D2WD support (and other SPI flash remapping) 2017-04-13 16:25:15 +10:00
ethernet docs: Generate Doxygen directives for API documentation 2017-05-19 18:26:02 +02:00
expat Build system: Raise warning level 2016-11-16 15:57:34 +11:00
fatfs vfs, fatfs: fix support for two FATFS instances (SD and flash) 2017-05-05 15:21:38 +08:00
freertos freertos: Fix crash when waking task on CPU1 with scheduler disabled 2017-06-05 16:12:20 +10:00
idf_test CI: remove readme content: 2017-05-08 11:44:45 +08:00
jsmn Add jsmn JSON parser component 2017-03-07 10:18:47 +11:00
json cJSON:Add float format process 2017-01-09 17:51:48 +08:00
log component/bt: add open and close event for gatts 2017-06-01 15:01:54 +08:00
lwip Merge branch 'bugfix/make_srcdirs_order' into 'master' 2017-06-06 14:37:21 +08:00
mbedtls component/soc : move dport access header files to soc 2017-05-09 18:06:00 +08:00
mdns Add AFL fuzz test 2017-04-05 09:23:09 +03:00
micro-ecc micro-ecc: Add submodule dependency 2016-11-17 09:18:51 +11:00
newlib esp32: make time monotonic across resets 2017-06-16 12:06:04 +08:00
nghttp nghttp module: Update to v1.22, use submodule instead of in-tree source 2017-05-17 14:05:54 +10:00
nvs_flash nvs: remove search cache at page level 2017-05-12 12:18:08 +08:00
openssl components/openssl : Fix compilation error when openssl debugging is enabled 2017-02-20 09:45:50 +08:00
partition_table gen_esp32part: Run unit tests on host as part of gitlab-ci 2017-05-12 16:28:41 +10:00
sdmmc esp32: add [ignore] tag to some unit test cases for CI 2017-01-18 17:08:20 +08:00
soc Merge branch 'bugfix/lib_dport_access' into 'master' 2017-05-18 14:56:38 +08:00
spi_flash component/soc : move dport access header files to soc 2017-05-09 18:06:00 +08:00
tcpip_adapter give the AP and STA netifs different names for ease of debugging lwip 2017-04-11 20:40:36 +08:00
ulp examples: add ULP ADC example 2017-05-16 13:15:02 +08:00
vfs docs: Generate Doxygen directives for API documentation 2017-05-19 18:26:02 +02:00
wear_levelling Getting started guides 2017-04-27 19:51:42 +02:00
wpa_supplicant wpa2 enterprise: change the type macro to platform default macro ESP_PLATFORM. 2016-11-25 16:56:09 +08:00
xtensa-debug-module component/soc : move dport access header files to soc 2017-05-09 18:06:00 +08:00