esp-idf/components/esp_system
Jiang Jiang Jian 20b42ca0bb Merge branch 'bugfix/bod_intr_v4.3' into 'release/v4.3'
brownout: Disable the hardware BOD when BOD interrupt is enabled(backport v4.3)

See merge request espressif/esp-idf!27438
2023-12-01 19:23:05 +08:00
..
include fix(intr_flags_to_level): fix value returned one more than correct value 2023-11-21 02:45:39 +00:00
port gpio: Fix IO hold function related problems 2023-08-08 02:40:46 +00:00
test Change: rewrite EXT1 triggle mode all_low to any_low when not esp32 2023-07-25 17:50:32 +08:00
test_apps test_rtc: add test_app to test power consumption 2023-07-20 03:07:51 +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 fix rtc register read error and add workaround for rtc bus isolate issue 2023-08-11 19:46:06 +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 brownout: Disable the hardware BOD when BOD interrupt is enabled 2023-11-28 17:08:57 +08:00
sdkconfig.rename Security: ESP32C3 memory protection feature (IRAM0/DRAM0) 2021-01-27 08:44:03 +01:00
sleep_modes.c Merge branch 'bugfix/fix_cache_data_mem_corrupt_after_sleep_v4.3' into 'release/v4.3' 2023-09-04 14:26:06 +08: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.

Brownout

on some boards, we name BOD1 as ana_bod, to unify the usage, using BOD1 in following passage.

BOD1 will be a little faster then BOD0, but BOD0 can be widely used(can reset rf, flash, or using interrupt, etc.) So, in IDF code, we use BOD1 in bootloader and BOD0 in the app.