![Maxim Integrated MAX32660 User Manual Download Page 96](http://html1.mh-extra.com/html/maxim-integrated/max32660/max32660_user-manual_1744484096.webp)
MAX32660 User Guide
Maxim Integrated
Page 96 of 195
9
Real-Time Clock (RTC)
9.1
Overview
The Real-Time Clock (RTC) is a binary timer that keeps the time of day and provides time-of-day and sub-second alarm
functionality in the form of RTC system interrupts. The RTC time base is created using a 32.768kHz crystal connected
between the 32KIN and 32KOUT pins on the MAX32660. See the MAX32660 datasheet for detailed connection and pin
information related to the 32KIN and 32KOUT pins.
In the RTC, two registers combine to create a 40-bit counter representing time with 1/256 second resolution. The
.rtss
field contains the least significant 8 bits and represents the sub-second count. The
.rts
field contains
the most significant 32 bits and represents the seconds count. The
.rts
field increments on each rollover of the
.rtss
field. Together the 40 bits represent time in seconds up to approximately 136 years.
A programmable time-of-day alarm is usable with the 32-bit seconds counter to provide a single event/alarm timer. You
must disable the RTC to write the counter registers. When the RTC counter is started, the RTC counts continuously unless it
is disabled, and reads of the counter registers do not affect the count. Digital trim is available for applications requiring
higher accuracy.
A separate 32-bit auto-reload sub-second alarm counter register (
) generates interval alarms. Incremented at
256Hz, this counter has a granularity of 3.9 msec, with a maximum interval of approximately 16,777,216 seconds.
The RTC operates in the always-on domain. Once enabled, it continues counting as long as the RTC is enabled and the VRTC
supply remains within the acceptable range given in the datasheet. The RTC increments the
.vrtc_tmr
field every
32 seconds when the RTC is enabled and operating.