About unlock STM32L100xx, STM32L151xx, STM32L152xx, STM32L162xx System reset; The system resets all registers except RTC, RTC backup register, and control/status register RCC_CSR. The system reset is generated by:
NRST pin is pulled low
End of watchdog count (WWDG reset)
End of independent watchdog technology (IWDG reset)
Software reset (SW reset)
Low power management reset
Option Byte Load Reset
Exit Standby mode These reset sources can be acknowledged by looking at the corresponding reset flag bits in the RCC_CSR register. Software reset Reset by setting the SYSRESETREQ bit in the Application Interrupt and Reset Control register of the Cortex-M3. We need to refer to the Cortex-M3 kernel-related information. Low power management reset The following two scenarios result in a low power management reset:
Enter Standby mode: This reset is enabled by resetting the nRST_STDBY bit in the User Option Byte. In this case, the device will enter the reset state instead of entering Standby mode when the sequence of entering Standby mode is executed at any time.
Enter the Stop mode: This reset is enabled by resetting the nRST_STOP bit in the user option byte. In this case, the device will enter the reset state instead of entering the Stop mode when the sequence of entering the Stop mode is executed at any time.
Option byte load reset The OBL_LAUNCH bit in the FLASH_PECR register generates an option byte to load the reset. This bit is used to load the option byte in software mode. Power Reset Generate a power reset:
1.Power-on/power-down reset (POR/PDR reset) 2.BOR reset A power reset resets the values of all registers, including the records in the RTC field. The reset generated by these reset sources causes the NRST pin to remain low for the delay phase. The RESET service entry vector address is 0x0000_0004. The system reset signal is also output on the NRST pin. The pulse generator produces a minimum reset time of 20 us for each internal reset source. In an external reset, the reset pulse is generated with the NRST pin pulled low. RTC and backup register reset What can use the following two cases to reset the RTC peripheral, RTC clock source selection (in RCC_CSR) and the backup register:
Set the reset caused by RTCRST in the RCC_CSR record.