RM0008 Backup registers (BKP)
61/690
5 Backup registers (BKP)
Low-density devices are STM32F101xx, STM32F102xx and STM32F103xx
microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes.
Medium-density devices are STM32F101xx, STM32F102xx and STM32F103xx
microcontrollers where the Flash memory density ranges between 64 and 128 Kbytes.
High-density devices are STM32F101xx and STM32F103xx microcontrollers where the
Flash memory density ranges between 256 and 512 Kbytes.
This Section applies to the whole STM32F10xxx family, unless otherwise specified.
5.1 BKP introduction
The backup registers are forty two 16-bit registers for storing 84 bytes of user application
data. They are implemented in the backup domain that remains powered on by V
BAT
when
the V
DD
power is switched off. They are not reset when the device wakes up from Standby
mode or by a system reset or power reset.
In addition, the BKP control registers are used to manage the Tamper detection feature and
RTC calibration.
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.
5.2 BKP main features
● 20-byte data registers (in medium-density and low-density devices) or 84-byte data
registers (in high-density devices)
● Status/control register for managing tamper detection with interrupt capability
● Calibration register for storing the RTC calibration value
● Possibility to output the RTC Calibration Clock, RTC Alarm pulse or Second pulse on
TAMPER pin PC13 (when this pin is not used for tamper detection)