STM32L4xx_HAL_Driver  1.14.0

Functions

__STATIC_INLINE void LL_RCC_SetRTCClockSource (uint32_t Source)
 Set RTC Clock Source. More...
 
__STATIC_INLINE uint32_t LL_RCC_GetRTCClockSource (void)
 Get RTC Clock Source BDCR RTCSEL LL_RCC_GetRTCClockSource. More...
 
__STATIC_INLINE void LL_RCC_EnableRTC (void)
 Enable RTC BDCR RTCEN LL_RCC_EnableRTC. More...
 
__STATIC_INLINE void LL_RCC_DisableRTC (void)
 Disable RTC BDCR RTCEN LL_RCC_DisableRTC. More...
 
__STATIC_INLINE uint32_t LL_RCC_IsEnabledRTC (void)
 Check if RTC has been enabled or not BDCR RTCEN LL_RCC_IsEnabledRTC. More...
 
__STATIC_INLINE void LL_RCC_ForceBackupDomainReset (void)
 Force the Backup domain reset BDCR BDRST LL_RCC_ForceBackupDomainReset. More...
 
__STATIC_INLINE void LL_RCC_ReleaseBackupDomainReset (void)
 Release the Backup domain reset BDCR BDRST LL_RCC_ReleaseBackupDomainReset. More...
 

Detailed Description

Function Documentation

◆ LL_RCC_DisableRTC()

__STATIC_INLINE void LL_RCC_DisableRTC ( void  )

Disable RTC BDCR RTCEN LL_RCC_DisableRTC.

Return values
None

Definition at line 3682 of file stm32l4xx_ll_rcc.h.

3683 {
3684  CLEAR_BIT(RCC->BDCR, RCC_BDCR_RTCEN);
3685 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RCC_EnableRTC()

__STATIC_INLINE void LL_RCC_EnableRTC ( void  )

Enable RTC BDCR RTCEN LL_RCC_EnableRTC.

Return values
None

Definition at line 3672 of file stm32l4xx_ll_rcc.h.

3673 {
3674  SET_BIT(RCC->BDCR, RCC_BDCR_RTCEN);
3675 }

◆ LL_RCC_ForceBackupDomainReset()

__STATIC_INLINE void LL_RCC_ForceBackupDomainReset ( void  )

Force the Backup domain reset BDCR BDRST LL_RCC_ForceBackupDomainReset.

Return values
None

Definition at line 3702 of file stm32l4xx_ll_rcc.h.

3703 {
3704  SET_BIT(RCC->BDCR, RCC_BDCR_BDRST);
3705 }

◆ LL_RCC_GetRTCClockSource()

__STATIC_INLINE uint32_t LL_RCC_GetRTCClockSource ( void  )

Get RTC Clock Source BDCR RTCSEL LL_RCC_GetRTCClockSource.

Return values
Returnedvalue can be one of the following values:
  • LL_RCC_RTC_CLKSOURCE_NONE
  • LL_RCC_RTC_CLKSOURCE_LSE
  • LL_RCC_RTC_CLKSOURCE_LSI
  • LL_RCC_RTC_CLKSOURCE_HSE_DIV32

Definition at line 3662 of file stm32l4xx_ll_rcc.h.

3663 {
3664  return (uint32_t)(READ_BIT(RCC->BDCR, RCC_BDCR_RTCSEL));
3665 }

◆ LL_RCC_IsEnabledRTC()

__STATIC_INLINE uint32_t LL_RCC_IsEnabledRTC ( void  )

Check if RTC has been enabled or not BDCR RTCEN LL_RCC_IsEnabledRTC.

Return values
Stateof bit (1 or 0).

Definition at line 3692 of file stm32l4xx_ll_rcc.h.

3693 {
3694  return ((READ_BIT(RCC->BDCR, RCC_BDCR_RTCEN) == RCC_BDCR_RTCEN) ? 1UL : 0UL);
3695 }

◆ LL_RCC_ReleaseBackupDomainReset()

__STATIC_INLINE void LL_RCC_ReleaseBackupDomainReset ( void  )

Release the Backup domain reset BDCR BDRST LL_RCC_ReleaseBackupDomainReset.

Return values
None

Definition at line 3712 of file stm32l4xx_ll_rcc.h.

3713 {
3714  CLEAR_BIT(RCC->BDCR, RCC_BDCR_BDRST);
3715 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RCC_SetRTCClockSource()

__STATIC_INLINE void LL_RCC_SetRTCClockSource ( uint32_t  Source)

Set RTC Clock Source.

Note
Once the RTC clock source has been selected, it cannot be changed anymore unless the Backup domain is reset, or unless a failure is detected on LSE (LSECSSD is set). The BDRST bit can be used to reset them. BDCR RTCSEL LL_RCC_SetRTCClockSource
Parameters
SourceThis parameter can be one of the following values:
  • LL_RCC_RTC_CLKSOURCE_NONE
  • LL_RCC_RTC_CLKSOURCE_LSE
  • LL_RCC_RTC_CLKSOURCE_LSI
  • LL_RCC_RTC_CLKSOURCE_HSE_DIV32
Return values
None

Definition at line 3648 of file stm32l4xx_ll_rcc.h.

3649 {
3650  MODIFY_REG(RCC->BDCR, RCC_BDCR_RTCSEL, Source);
3651 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)