esp-idf/components/esp_system
2023-03-30 03:15:45 +00:00
..
include Merge branch 'bugfix/fix_gpio_wakeup_related_issues_in_ssc_sleep_test_backport_v4.3' into 'release/v4.3' 2023-02-26 15:51:29 +08:00
port esp_system: use ESP_CONSOLE_UART_NUM instead of CONSOLE_UART_NUM 2022-11-28 10:37:39 +08:00
test all: Apply new version logic (major * 100 + minor) 2023-03-02 03:21:34 +00:00
test_apps/rtc_8md256 pm: add test for RTC using 8MD256 as clock source 2022-11-04 12:37:45 +08: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 apptrace: Refactors apptrace for better support various tracing HW 2022-05-13 08:45:31 +00:00
Kconfig usb_serial_jtag: fixed the docs that we can use usj in sleep modes 2022-09-22 17:39:15 +08:00
linker.lf components: fix ldgen check errors 2021-01-19 11:17:18 +08:00
panic.c apptrace: Refactors apptrace for better support various tracing HW 2022-05-13 08:45:31 +00: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 deep sleep: close rf to optimize sleep current 2023-03-30 03:15:45 +00:00
startup.c all: Apply new version logic (major * 100 + minor) 2023-03-02 03:21:34 +00: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.