RM0041
17
Real-time clock (RTC)
Low-density value line devices are STM32F100xx microcontrollers where the flash
memory density ranges between 16 and 32 Kbytes.
Medium-density value line devices are STM32F100xx microcontrollers where the flash
memory density ranges between 64and 128 Kbytes.
High-density value line devices are STM32F100xx microcontrollers where the flash
memory density ranges between 256 and 512 Kbytes.
This section applies to the whole STM32F10xxx family, unless otherwise specified.
17.1
RTC introduction
The real-time clock is an independent timer. The RTC provides a set of continuously running
counters which can be used, with suitable software, to provide a clock-calendar function.
The counter values can be written to set the current time/date of the system.
The RTC core and clock configuration (RCC_BDCR register) are in the Backup domain,
which means that RTC setting and time are kept after reset or wakeup from Standby mode.
After reset, access to the Backup registers and RTC is disabled and the Backup domain
(BKP) is protected against possible parasitic write access. To enable access to the Backup
registers and the RTC, proceed as follows:
•
enable the power and backup interface clocks by setting the PWREN and BKPEN bits
in the RCC_APB1ENR register
•
set the DBP bit the Power Control register (PWR_CR) to enable access to the Backup
registers and RTC.
RM0041 Rev 6
Real-time clock (RTC)
469/709
480
Need help?
Do you have a question about the STM32F100 Series and is the answer not in the manual?
Questions and answers