RM0033 Rev 9 571/1381
RM0033 Real-time clock (RTC)
597
22.2 RTC main features
The RTC unit main features are the following (see Figure 215: RTC block diagram):
• Calendar with seconds, minutes, hours (12 or 24 format), day (day of week), date (day
of month), month, and year.
• Daylight saving compensation programmable by software.
• Two programmable alarms with interrupt function. The alarms can be triggered by any
combination of the calendar fields.
• Automatic wakeup unit generating a periodic flag that triggers an automatic wakeup
interrupt.
• Reference clock detection: a more precise second source clock (50 or 60 Hz) can be
used to enhance the calendar precision.
• Maskable interrupts/events:
–Alarm A
–Alarm B
– Wakeup interrupt
–Timestamp
– Tamper detection
• Digital calibration circuit (periodic counter correction)
– 5 ppm accuracy
• Timestamp function for event saving (1 event)
• Tamper detection:
– 1 tamper event on edge detection
• 20 backup registers (80 bytes). The backup registers are reset when a tamper
detection event occurs.
• RTC alternate function outputs (RTC_AFO):
– AFO_CALIB: 512 Hz clock output (with an LSE frequency of 32.768 kHz). It is
routed to the device RTC_AF1 pin.
– AFO_ALARM: Alarm A or Alarm B or wakeup (only one can be selected). It is
routed to the device RTC_AF1 pin.
• RTC alternate function inputs (RTC_AFI):
– AFI_TAMPER1: tamper event detection. It is routed to the device RTC_AF1 and
RTC_AF2 pins.
– AFI_TIMESTAMP: timestamp event detection.
It is routed to the device RTC_AF1
and RTC_AF2 pins.
Note: Refer to Section 6.4.1: GPIO port mode register (GPIOx_MODER) (x = A..I) for more details
on how to select RTC alternate functions (RTC_AF1 and RTC_AF2).