English
Language : 

AN3371 Datasheet, PDF (1/45 Pages) STMicroelectronics – Using the hardware real-time clock
Note:
AN3371
Application note
Using the hardware real-time clock (RTC)
in STM32 F0, F2, F3, F4 and L1 series of MCUs
Introduction
A real-time clock (RTC) is a computer clock that keeps track of the current time. Although
RTCs are often used in personal computers, servers and embedded systems, they are also
present in almost any electronic device that requires accurate time keeping. Microcontrollers
supporting RTC can be used for chronometers, alarm clocks, watches, small electronic
agendas, and many other devices.
This application note describes the features of the real-time clock (RTC) controller embedded
in Ultra Low Power Medium-density, Ultra Low Power High-density, F0, F2 and F4 series
devices microcontrollers, and the steps required to configure the RTC for use with the calendar,
alarm, periodic wakeup unit, tamper detection, timestamp and calibration applications.
Examples are provided with configuration information to enable you to quickly and correctly
configure the RTC for calendar, alarm, periodic wakeup unit, tamper detection, time stamp
and calibration applications.
All examples and explanations are based on the STM32L1xx, STM32F0xx, STM32F2xx
STM32F4xx and STM32F3xx firmware libraries and reference manuals of STM32L1xx
(RM0038), STM32F0xx (RM0091), STM32F2xx (RM0033), STM32F4xx (RM0090),
STM32F37x (RM0313) and STM32F30x(RM0316).
STM32 refers to Ultra Low Power Medium-density, Ultra Low Power High-density, F0, F2
and F4 series devices in this document.
Ultra Low Power Medium (ULPM) density devices are STM32L151xx and STM32L152xx
microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes.
Ultra Low Power High (ULPH) density devices are STM32L151xx, STM32L152xx and
STM32L162xx microcontrollers where the Flash memory density is 384 Kbytes.
F2 series devices are STM32F205xx, STM32F207xx, STM32F215xx and STM32F217xx
microcontrollers.
STM32F3xx refers to STM32F30x, STM32F31x, STM32F37x and STM32F38x devices.
F4 series are STM32F405xx, STM32F407xx, STM32F415xx and STM32F417xx microcontrollers.
F0 series devices are microcontrollers.
Table 1 lists the microcontrollers concerned by this application note.
Table 1. Applicable products
Type
Applicable products
Microcontrollers
STM32 F0
STM32 F2
STM32 F3 (STM32F30x, STM32F31x, STM32F37x, STM32F38x)
STM32 F4 (STM32F405xx, STM32F407xx, STM32F415xx, STM32F417xx)
STM32 L1
September 2012
Doc ID 018624 Rev 5
1/45
www.st.com