Real-Time Clock (RTC) Overview#
Introduction to the RTC#
A Real-Time Clock (RTC) is a specialized digital timekeeping component (hardware peripheral) designed to maintain accurate time even when the main system is in a low-power state. Commonly found in embedded systems, RTCs ensure continuous time tracking independent of the main processor. In microcontroller-based applications, RTCs are particularly valuable for enabling energy-efficient design, allowing the system to enter Deep Sleep modes while keeping time. For instance, in platforms like the SiWG917, the RTC operates on a low-frequency clock source, consuming minimal power while supporting features such as calendar tracking and timed wake-ups during M4 low-power mode operation. This makes RTCs essential for applications requiring precise timekeeping with minimal energy usage, especially in battery-powered systems.
SiWG917 RTC Architecture#
Key Features#
Supports both second-based and millisecond-based time triggers for flexible scheduling.
Automatically adjusts for month lengths and leap years, maintaining accurate timekeeping for up to 400 years.
Offers selectable clock sources for the Calendar function, including an internal resistor-capacitor (RC) oscillator or an external 32 kHz crystal oscillator (XTAL).
Note: While the Calendar hardware supports up to four centuries of date tracking, this capability is constrained by the UNIX/Epoch 32-bit time format, which represents valid timestamps only between 1970 and 2038.
Therefore, when using SDK Epoch-based conversions, only century values 1 and 2 (corresponding roughly to years 1900–2099) are applicable.
Clock Architecture#
The Calendar peripheral in the Ultra-Ultra-Low-Power (UULP) domain operates from low-frequency clock sources that allow it to keep accurate time and manage scheduled events, even when the M4 is operating in low-power mode. The architecture supports multiple 32 kHz clock options to ensure flexibility, power efficiency, and reliability across different applications.
The Watchdog Timer, Sleep Clock Calibrator, and Calendar module share access to the low-frequency clock domain. The System Real-Time Clock (SYSRTC) and other VBAT-domain blocks can also use these sources, ensuring continuity of operation even when the M4 is operating in low-power states.
The Calendar peripheral can select from these available clock sources to maintain timekeeping across Sleep modes:
RC_32KHz Clock (
RC_32KHz_CLK): A low-power RC oscillator running at 32 kHz. Useful when low-power consumption is required and high-accuracy timing is not critical. Typically suited for basic watchdog and wake-up timer applications where long-term drift is acceptable.XTAL_32KHz Clock (
XTAL_32KHz_CLK):An external 32.768 kHz crystal oscillator input.
Provides the highest accuracy and long-term stability, making it the preferred source for precise timekeeping.
Essential for calendar operations, real-time clock (RTC) applications, and sleep clock calibration.
Suitable for applications requiring synchronization, low-drift operation over temperature, or compliance with communication standards.
Low-Frequency Clock Architecture#


Note: For the SiWG917 System-on-Chip (SoC), an external 32.768 kHz crystal (XTAL) is now mandatory for applications requiring accurate real-time timing or ultra-low-power Wi-Fi, Bluetooth, or Coex operation. See the SiWG917 SoC Errata for more details. Ensure your hardware design includes this crystal (and appropriate routing/layout).
Power Domain and Wake-Up Source Configuration#
The Calendar resides in UULP domain, clocked from RC/XTAL sources in that domain.
The calendar or alarm can be used as UULP Wake-Up sources via Power Manager. Second or alarm Wake-Ups can be enabled individually.