Low Power

  • low_power
  • sleep
  • rtc
  • 32.768 KHz
  • Wi-Fi

esp_timer_get_time() returns only the time elapsed since boot. If the device has no external RTC, how can the system sleep time be obtained?

esp_timer_get_time() returns a microsecond timer value accumulated only during the current software runtime. After the chip enters deep sleep, most hardware is powered down and the internal timer stops running, so the timer does not continue increasing while the device is asleep.

In other words, esp_timer_get_time() cannot provide a total elapsed time that includes deep-sleep duration.

If the device does not have an external RTC, the recommended approach is to obtain standard time through NTP after the device connects to the network. For more information, refer to the ESP-IDF system time documentation:
https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32c3/api-reference/system/system_time.html

Is a 32.768 KHz crystal required for Wi-Fi low-power applications?

No. An external 32.768 KHz crystal can further reduce power consumption in some low-power scenarios, but in Wi-Fi applications the overall improvement is usually limited.

It is recommended to reserve the 32.768 KHz crystal footprint during hardware design, then decide whether to populate it based on actual power-consumption test results. This keeps the design flexible while controlling BOM cost.