The RTC is driven by the 32-kHz oscillator and it provides the alarm and time-keeping functions.
The main functions of the RTC block are:
- Time information (seconds, minutes, and hours) in
binary-coded decimal (BCD) code
- Calendar information (day, month, year, and day
of the week) in BCD code up to year 2099
- Configurable interrupts generation; the RTC can generate two types interrupts which can be enabled and masked individually:
- Timer interrupts periodically (1-second, 1-minute, 1-hour, or 1-day periods)
- Alarm interrupt at a precise time of the day (alarm function)
- Oscillator frequency calibration and time correction with 1/32768 resolution
Figure 8-13 shows the RTC block diagram.