Real-time clock (RTC)
RM0090
790/1731
DocID018909 Rev 11
26.2
RTC main features
The RTC unit main features are the following (see
•
Calendar with subseconds, 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.
•
Accurate synchronization with an external clock using the subsecond shift feature.
•
Maskable interrupts/events:
–
Alarm A
–
Alarm B
–
Wakeup interrupt
–
Timestamp
–
Tamper detection
•
Digital calibration circuit (periodic counter correction)
–
5 ppm accuracy
–
0.95 ppm accuracy, obtained in a calibration window of several seconds
•
Timestamp function for event saving (1 event)
•
Tamper detection:
–
2 tamper events with configurable filter and internal pull-up.
•
20 backup registers (80 bytes). The backup registers are reset when a tamper
detection event occurs.
•
Alternate function output (RTC_OUT) which selects one of the following two outputs:
–
RTC_CALIB: 512 Hz or 1 Hz clock output (with an LSE frequency of 32.768 kHz).
This output is enabled by setting the COE bit in the RTC_CR register. It is routed
to the device RTC_AF1 function.
–
RTC_ALARM (Alarm A, Alarm B or wakeup).
This output is selected by configuring the OSEL[1:0] bits in the RTC_CR register.
It is routed to the device RTC_AF1 function.
•
RTC alternate function inputs:
–
RTC_TS: timestamp event detection. It is routed to the device RTC_AF1 and
RTC_AF2 functions.
–
RTC_TAMP1: TAMPER1 event detection. It is routed to the device RTC_AF1 and
RTC_AF2 functions.
–
RTC_TAMP2: TAMPER2 event detection.
–
RTC_REFIN: reference clock input (usually the mains, 50 or 60 Hz).
Section 8.3.15: Selection of RTC_AF1 and RTC_AF2 alternate functions