aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32L1xx/hal_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/STM32L1xx/hal_lld.c')
-rw-r--r--os/hal/platforms/STM32L1xx/hal_lld.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/os/hal/platforms/STM32L1xx/hal_lld.c b/os/hal/platforms/STM32L1xx/hal_lld.c
index 4e1b385a3..e4b21ede3 100644
--- a/os/hal/platforms/STM32L1xx/hal_lld.c
+++ b/os/hal/platforms/STM32L1xx/hal_lld.c
@@ -46,8 +46,8 @@
*/
static void hal_lld_backup_domain_init(void) {
- /* Backup domain access enabled during initialization.*/
- PWR->CR |= PWR_CR_DBP;
+ /* Backup domain access enabled and left open.*/
+ PWR->CR = PWR_CR_DBP;
/* If enabled then the LSE is started.*/
#if STM32_LSE_ENABLED
@@ -72,9 +72,6 @@ static void hal_lld_backup_domain_init(void) {
RCC->CSR |= RCC_CSR_RTCEN;
}
#endif /* STM32_RTCSEL != STM32_RTCSEL_NOCLOCK */
-
- /* Backup domain access disabled for operations safety.*/
- PWR->CR &= ~PWR_CR_DBP;
}
/*===========================================================================*/