esp-idf/components/esp_system
2022-05-01 23:22:05 +08:00
..
include Merge branch 'bugfix/fix_esp32s2_deep_sleep_timer_wake_up_fail_backport_v4.3' into 'release/v4.3' 2021-10-19 04:44:47 +00:00
port Systimer reset alternative on S2 (and others) (v4.3) 2021-10-28 08:00:28 +00:00
test Systimer reset alternative on S2 (and others) (v4.3) 2021-10-28 08:00:28 +00:00
CMakeLists.txt bootloader: fix external 32k xtal not found error 2021-01-20 16:51:20 +08:00
component.mk esp_system: support riscv panic 2020-11-13 07:49:11 +11:00
esp_async_memcpy.c async_mcp: clean eof flag when prepare rx descriptors 2021-02-24 17:46:23 +08:00
intr_alloc.c intr_alloc: re-enable unit test 2021-02-02 20:25:50 +08:00
Kconfig USB_SERIAL_JTAG: Fix the issue that there is no rom log when restarting 2022-02-10 10:33:40 +08:00
linker.lf components: fix ldgen check errors 2021-01-19 11:17:18 +08:00
panic.c usb_serial_jtag: support usb_serial_jtag on esp32c3 2021-10-11 17:34:24 +08:00
README.md Systimer reset alternative on S2 (and others) (v4.3) 2021-10-28 08:00:28 +00:00
sdkconfig.rename Security: ESP32C3 memory protection feature (IRAM0/DRAM0) 2021-01-27 08:44:03 +01:00
sleep_modes.c fix _rtc_slow_length being incorrectly optimized by compiler 2022-05-01 23:22:05 +08:00
startup.c esp_timer: allow querying the timer before esp_timer_init is called 2021-11-02 17:33:07 +08:00
system_api.c esp_system: Adds sync of FRC & RTC counters in esp_restart (v4.3) 2021-10-28 17:33:46 +00:00
system_time.c esp32c3: Apply one-liner/small changes for ESP32-C3 2020-12-01 10:58:50 +11:00

System Notes

Timekeeping

The following are the timekeeping mechanisms available and their differences:

  1. System time (esp_system_get_time)

Time with the origin at g_startup_time. The implementation is not handled by esp_system, but it does provide a default implementation using RTC timer. Currently, esp_timer provides system time, since the hardware timers are under the control of that component. However, no matter the underlying timer, the system time provider should maintain the definition of having the origin point at g_startup_time.

  1. esp_timer time (esp_timer_get_time)

This is the time read from an underlying hardware timer, controlled through config. Origin is at the point where the underlying timer starts counting.

  1. newlib time (gettimeofday)

Timekeeping function in standard library. Can be set (settimeofday) or moved forward/backward (adjtime); with the possibility of the changes being made persistent through config. Currently implemented in terms of system time, as the point of origin is fixed. If persistence is enabled, RTC time is also used in conjuction with system time.

  1. RTC time (esp_rtc_get_time_us)

Time read from RTC timer.