STM32L4xx_HAL_Driver  1.14.0
Initialization and de-initialization functions

Initialization and de-initialization functions. More...

Functions

void HAL_PWR_DeInit (void)
 Deinitialize the HAL PWR peripheral registers to their default reset values. More...
 
void HAL_PWR_EnableBkUpAccess (void)
 Enable access to the backup domain (RTC registers, RTC backup data registers). More...
 
void HAL_PWR_DisableBkUpAccess (void)
 Disable access to the backup domain (RTC registers, RTC backup data registers). More...
 

Detailed Description

Initialization and de-initialization functions.

 ===============================================================================
              ##### Initialization and de-initialization functions #####
 ===============================================================================
    [..]

Function Documentation

◆ HAL_PWR_DeInit()

void HAL_PWR_DeInit ( void  )

Deinitialize the HAL PWR peripheral registers to their default reset values.

Return values
None

Definition at line 87 of file stm32l4xx_hal_pwr.c.

88 {
89  __HAL_RCC_PWR_FORCE_RESET();
90  __HAL_RCC_PWR_RELEASE_RESET();
91 }

◆ HAL_PWR_DisableBkUpAccess()

void HAL_PWR_DisableBkUpAccess ( void  )

Disable access to the backup domain (RTC registers, RTC backup data registers).

Return values
None

Definition at line 115 of file stm32l4xx_hal_pwr.c.

116 {
117  CLEAR_BIT(PWR->CR1, PWR_CR1_DBP);
118 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ HAL_PWR_EnableBkUpAccess()

void HAL_PWR_EnableBkUpAccess ( void  )

Enable access to the backup domain (RTC registers, RTC backup data registers).

Note
After reset, the backup domain is protected against possible unwanted write accesses.
RTCSEL that sets the RTC clock source selection is in the RTC back-up domain. In order to set or modify the RTC clock, the backup domain access must be disabled.
LSEON bit that switches on and off the LSE crystal belongs as well to the back-up domain.
Return values
None

Definition at line 105 of file stm32l4xx_hal_pwr.c.

106 {
107  SET_BIT(PWR->CR1, PWR_CR1_DBP);
108 }