1. bkp can be used to save data
Bkp contains 42 16-bit registers that can store 84 bytes of content. They are powered by vbat for dimension mounting.
2. Data stored in bkp can be destroyed (if someone wants to maliciously obtain the data, it is more important to lose it than to protect it ). Stm32 provides a mechanism called tamper. Intrusion detection, which occupies an external pin (pc13 ).
3. If no intrusion detection function is required, the external pin can be used as the RTC calibration function, which will be studied later.
4. Values in bkp will not be lost or reset when the system is reset/power reset/standby mode is awakened.
Come back and study the stm32 reset mechanism. The following sections are related to the Data Manual.
6.1 Reset
Stm32f10xxx supports system reset, power-on reset, and backup region reset.
6.1.1 system reset
System reset resets all registers except the reset mark in the CSR of the clock control register and the registers in the backup Area
A system reset is generated when one of the following events occurs:
1. Low Level (external reset) on the nrst pin)
For example, an external reset (system reset) is generated when you press the reset button on the board)
2. Window watchdog count termination (wwdg reset)
3. independent watchdog count termination (iwdg reset)
4. Software reset (SW reset)
5. Low-Power Management Reset
You can view the reset status flag in the rcc_csr control status register to identify the source of the reset event.
6.1.2 Power Supply Reset
A power reset is generated when one of the following events occurs:
1. Power-on/power-down reset (por/PDR reset)
2. Return from the standby mode
Power Reset resets all registers except the backup area.
If you must manually reset the backup domain (all data is cleared), there are two methods:
A) Software reset (Operation of bdrst bit in rcc_bdcr is generated .);
B) if both VDD and vbat power is down, the backup domain reset will be triggered when both VDD and vbat power is on.