MAX32665-MAX32668 User Guide
Maxim Integrated Page 369 of 457
18. Real-Time Clock (RTC)
18.1 Overview
The Real-Time Clock (RTC) is a 32-bit binary timer that keeps the time of day up to 136 years. It provides time-of-day and
sub-second alarm functionality in the form of system interrupts.
The RTC operates on an external 32.768 time base. It can be generated from the internal crystal oscillator driving an
external 32.768kHz crystal between the 32KIN and 32KOUT pins, or a 32.768kHz square wave driven directly into the 32KIN
pin. Refer to the datasheet for the required electrical characteristics of the external crystal.
A user-configurable, digital frequency trim is provided for applications requiring higher accuracy.
The 32-bit seconds register RTC_SEC is incremented ever time there is a rollover of d RTC_SSEC.ssec sub-seconds field.
Two alarm functions are provided:
• A programmable time-of-day alarm provides a single event, alarm timer using the RTC_TODA alarm register,
RTC_SEC register, and RTC_CTRL.tod_alarm_en field.
• A programmable sub-second provides a recurring alarm using the RTC_SSECA and RTC_CTRL.ssec_alarm_en field
The RTC is powered in the always-on domain or if applicable, while there is a valid voltage on the VRTC pin.
Disabling the RTC stops incrementing RTC_SSEC, RTC_SEC, and the internal RTC sub-second counter, but preserves their
current value. The 32kHz oscillator is not affected by the RTC_CTRL.enable field.
The RTC increments the RTC_TRIM.vrtc_tmr field every 32 seconds while the RTC is enabled.
Figure 18-1. MAX32665―MAX32668 RTC Block Diagram (12-bit Sub-Second Counter)