Real-time clock (RTC)
25
Real-time clock (RTC)
25.1
Introduction
The real-time clock (RTC) is an independent BCD timer/counter. The RTC provides a
time-of-day clock/calendar, two programmable alarm interrupts, and a periodic
programmable wakeup flag with interrupt capability. The RTC also includes an automatic
wakeup unit to manage low power modes.
Two 32-bit registers contain the seconds, minutes, hours (12- or 24-hour format), day (day
of week), date (day of month), month, and year, expressed in binary coded decimal format
(BCD). The sub-seconds value is also available in binary format.
Compensations for 28-, 29- (leap year), 30-, and 31-day months are performed
automatically. Daylight saving time compensation can also be performed.
Additional 32-bit registers contain the programmable alarm subseconds, seconds, minutes,
hours, day, and date.
A digital calibration feature is available to compensate for any deviation in crystal oscillator
accuracy.
After backup domain reset, all RTC registers are protected against possible parasitic write
accesses.
As long as the supply voltage remains in the operating range, the RTC never stops,
regardless of the device status (Run mode, low power mode or under reset).
25.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:
–
–
–
–
–
•
Digital calibration circuit (periodic counter correction)
–
744/1324
Alarm A
Alarm B
Wakeup interrupt
Timestamp
Tamper detection
5 ppm accuracy
Figure
RM0430 Rev 8
254):
RM0430
Need help?
Do you have a question about the STM32F423 and is the answer not in the manual?
Questions and answers