OVMS3-idf/components/esp32/include
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
..
hwcrypto mbedTLS SHA: Fix cloning of SHA-384 digests 2016-11-25 19:26:30 +11:00
rom esp32: make time monotonic across resets 2017-06-16 12:06:04 +08:00
xtensa implement esp_deep_sleep, fix build issues 2016-11-22 21:54:49 +08:00
esp_app_trace.h esp32: Adds functionality for application tracing over JTAG 2017-04-17 23:26:29 +03:00
esp_assert.h component/esp32 : do more fix of dualcore bug 2017-05-12 15:41:51 +08:00
esp_attr.h deep sleep: keep RTC_SLOW_MEM powered on if data is placed into RTC slow memory 2017-01-12 14:15:30 +08:00
esp_cache_err_int.h add detection of invalid cache access 2017-04-13 15:27:38 +08:00
esp_clk.h esp32: make time monotonic across resets 2017-06-16 12:06:04 +08:00
esp_coexist.h coexist: enable coexist when wifi&bt are enabled, disable coexist when one of wifi&bt is disabled. 2017-02-20 23:53:25 +08:00
esp_core_dump.h esp32: Adds documentation and comments to core dump feature files 2017-01-11 20:51:28 +03:00
esp_crosscore_int.h Only init crosscore when FreeRTOS runs in multicore mode, add warnings that cross_int calls are private. 2016-10-27 16:50:28 +08:00
esp_deep_sleep.h deep sleep: add functions to check wakeup cause 2017-02-22 14:40:36 +08:00
esp_deepsleep.h deep sleep: rename header file 2016-12-16 14:30:27 +08:00
esp_dport_access.h component/esp32 : fix library sport access protections. 2017-05-13 19:55:11 +08:00
esp_err.h Optimize configuration of base MAC address 2017-05-10 10:15:07 +08:00
esp_event.h ethernet: add first version of ethernet driver 2016-12-01 19:17:48 +08:00
esp_event_loop.h Event handling refactoring 2016-09-26 01:17:32 +08:00
esp_flash_data_types.h Flash encryption: Support enabling flash encryption in bootloader, app support 2016-12-01 23:49:12 -08:00
esp_freertos_hooks.h Add comments/headers according to merge request comments 2016-11-15 12:10:02 +08:00
esp_gdbstub.h Move panic handler and gdbstub into esp32 component, clean up wdt according to merge req suggestions 2016-10-26 12:23:01 +08:00
esp_heap_alloc_caps.h Warn against and check for non-DMA-capable pointers being passed to SPI when DMA is used 2017-05-05 12:28:03 +08:00
esp_int_wdt.h Add documentation 2016-11-17 12:09:08 +08:00
esp_interface.h ethernet: add first version of ethernet driver 2016-12-01 19:17:48 +08:00
esp_intr.h add RMT driver and example 2016-11-22 00:57:19 +08:00
esp_intr_alloc.h esp32: sanity check ISR handler address passed into esp_intr_alloc 2017-01-11 11:38:17 +08:00
esp_ipc.h components/esp32,spi_flash: update some comments 2016-09-12 20:02:51 +08:00
esp_panic.h esp32: Core dump sanity checks were added 2017-04-26 21:13:02 +03:00
esp_phy_init.h Reset WIFI mac when wifi start and update wifi lib 2017-03-23 14:28:27 +08:00
esp_smartconfig.h esp32: refactor to sniffer 2016-12-15 18:20:00 +08:00
esp_ssc.h Initial public version 2016-08-17 23:08:22 +08:00
esp_system.h Merge branch 'feature/get_chip_ver' into 'master' 2017-05-11 12:05:55 +08:00
esp_task.h Enable lwip PPPoS support 2017-04-21 14:23:34 +10:00
esp_task_wdt.h Add documentation 2016-11-17 12:09:08 +08:00
esp_types.h remove legacy definitions from esp_types.h 2016-11-22 21:14:36 +08:00
esp_wifi.h esp32: add sniffer filter api 2017-06-06 19:07:12 +08:00
esp_wifi_internal.h Implement system_* APIs in IDF 2016-11-22 21:14:36 +08:00
esp_wifi_types.h esp32: add sniffer filter api 2017-06-06 19:07:12 +08:00
esp_wpa2.h add wpa2 set id api and modify null data tx description 2017-01-11 12:13:11 +08:00
esp_wps.h wps: add blocking param for API esp_wifi_wps_start() 2016-11-11 10:51:33 +08:00
heap_alloc_caps.h MR suggestions 2017-03-08 19:27:30 +08:00