RTC Usage Guide
Overview
The real-time clock (RTC) records time in embedded systems and keeps running even in low-power or deep-sleep modes.
Note
The RTC hardware is owned by the CP by default. The AP side only exposes read interfaces.
Usage Scenarios
Common RTC use cases:
Measure execution time: record start and end timestamps to compute duration.
Obtain NTP time: during AP initialization the task
ntp_sync_thread_entryperiodically callsntp_sync_to_rtcto synchronize with the network. After connecting, it stores the offset between wall-clock time and RTC, plus the boot timestamp. If the device goes offline later, calltimestamp_get()to obtain the current time.
Further information: RTC example driver