The real-time clock module provides time-keeping for the application, with counters for seconds, minutes, hours, day of the week, day of the month, and year, in selectable binary or binary-coded decimal (BCD) format. A variety of programmable interrupt alarms are provided. There are RTC instances (RTC, RTC_x) that provide common key features, and additional instances (RTC_x) that provide specific key features.
Common key features of across all instances of the real-time clock (RTC, RTC_x) include:
- Real-time clock and calendar mode providing seconds, minutes, hours, day of week, day of month, and year
- Selectable binary or binary-coded decimal (BCD) format
- Leap-year correction (valid for year 1901 through 2099)
- Two customizable calendar alarm interrupts based on minute, hour, day of the week, and day of the month
- Interval alarm interrupt to wake every minute, every hour, at midnight, or at noon
- Periodic interrupt to wake at 4096, 2048, 1024, 512, 256, or 128Hz
- Periodic interrupt to wake at 64, 32, 16, 8, 4, 2, 1, and 0.5Hz
- Interrupt capability down to STANDBY mode with STOPCLKSTBY
- Calibration for crystal offset error and crystal temperature drift (up to ±240 ppm total)
- RTC clock output to pin for calibration
RTC_x instances include features such as:
- Three bit prescaler for heartbeat function with interrupt generation
- RTC external clock selection of untrimmed 32kHz, trimmed 512Hz, 256Hz or 1Hz
- RTC time stamp capture upon detection of a timer stamp event, including tamper (TIO) event and VDD fail event
- RTC counter lock function