STM32L4xx_HAL_Driver  1.14.0

Functions

__STATIC_INLINE void LL_RCC_LSE_Enable (void)
 Enable Low Speed External (LSE) crystal. BDCR LSEON LL_RCC_LSE_Enable. More...
 
__STATIC_INLINE void LL_RCC_LSE_Disable (void)
 Disable Low Speed External (LSE) crystal. BDCR LSEON LL_RCC_LSE_Disable. More...
 
__STATIC_INLINE void LL_RCC_LSE_EnableBypass (void)
 Enable external clock source (LSE bypass). BDCR LSEBYP LL_RCC_LSE_EnableBypass. More...
 
__STATIC_INLINE void LL_RCC_LSE_DisableBypass (void)
 Disable external clock source (LSE bypass). BDCR LSEBYP LL_RCC_LSE_DisableBypass. More...
 
__STATIC_INLINE void LL_RCC_LSE_SetDriveCapability (uint32_t LSEDrive)
 Set LSE oscillator drive capability. More...
 
__STATIC_INLINE uint32_t LL_RCC_LSE_GetDriveCapability (void)
 Get LSE oscillator drive capability BDCR LSEDRV LL_RCC_LSE_GetDriveCapability. More...
 
__STATIC_INLINE void LL_RCC_LSE_EnableCSS (void)
 Enable Clock security system on LSE. BDCR LSECSSON LL_RCC_LSE_EnableCSS. More...
 
__STATIC_INLINE void LL_RCC_LSE_DisableCSS (void)
 Disable Clock security system on LSE. More...
 
__STATIC_INLINE uint32_t LL_RCC_LSE_IsReady (void)
 Check if LSE oscillator Ready BDCR LSERDY LL_RCC_LSE_IsReady. More...
 
__STATIC_INLINE uint32_t LL_RCC_LSE_IsCSSDetected (void)
 Check if CSS on LSE failure Detection BDCR LSECSSD LL_RCC_LSE_IsCSSDetected. More...
 
__STATIC_INLINE void LL_RCC_LSE_DisablePropagation (void)
 Disable LSE oscillator propagation. More...
 
__STATIC_INLINE void LL_RCC_LSE_EnablePropagation (void)
 Enable LSE oscillator propagation. More...
 
__STATIC_INLINE uint32_t LL_RCC_LSE_IsPropagationEnabled (void)
 Check if LSE oscillator propagation is enabled BDCR LSESYSDIS LL_RCC_LSE_IsPropagationEnabled. More...
 

Detailed Description

Function Documentation

◆ LL_RCC_LSE_Disable()

__STATIC_INLINE void LL_RCC_LSE_Disable ( void  )

Disable Low Speed External (LSE) crystal. BDCR LSEON LL_RCC_LSE_Disable.

Return values
None

Definition at line 2278 of file stm32l4xx_ll_rcc.h.

2279 {
2280  CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEON);
2281 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RCC_LSE_DisableBypass()

__STATIC_INLINE void LL_RCC_LSE_DisableBypass ( void  )

Disable external clock source (LSE bypass). BDCR LSEBYP LL_RCC_LSE_DisableBypass.

Return values
None

Definition at line 2298 of file stm32l4xx_ll_rcc.h.

2299 {
2300  CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEBYP);
2301 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RCC_LSE_DisableCSS()

__STATIC_INLINE void LL_RCC_LSE_DisableCSS ( void  )

Disable Clock security system on LSE.

Note
Clock security system can be disabled only after a LSE failure detection. In that case it MUST be disabled by software. BDCR LSECSSON LL_RCC_LSE_DisableCSS
Return values
None

Definition at line 2350 of file stm32l4xx_ll_rcc.h.

2351 {
2352  CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSECSSON);
2353 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RCC_LSE_DisablePropagation()

__STATIC_INLINE void LL_RCC_LSE_DisablePropagation ( void  )

Disable LSE oscillator propagation.

Note
LSE clock is not propagated to any peripheral except to RTC which remains clocked
A 2 LSE-clock delay is needed for LSESYSDIS setting to be taken into account BDCR LSESYSDIS LL_RCC_LSE_DisablePropagation
Return values
None

Definition at line 2383 of file stm32l4xx_ll_rcc.h.

2384 {
2385  SET_BIT(RCC->BDCR, RCC_BDCR_LSESYSDIS);
2386 }

◆ LL_RCC_LSE_Enable()

__STATIC_INLINE void LL_RCC_LSE_Enable ( void  )

Enable Low Speed External (LSE) crystal. BDCR LSEON LL_RCC_LSE_Enable.

Return values
None

Definition at line 2268 of file stm32l4xx_ll_rcc.h.

2269 {
2270  SET_BIT(RCC->BDCR, RCC_BDCR_LSEON);
2271 }

◆ LL_RCC_LSE_EnableBypass()

__STATIC_INLINE void LL_RCC_LSE_EnableBypass ( void  )

Enable external clock source (LSE bypass). BDCR LSEBYP LL_RCC_LSE_EnableBypass.

Return values
None

Definition at line 2288 of file stm32l4xx_ll_rcc.h.

2289 {
2290  SET_BIT(RCC->BDCR, RCC_BDCR_LSEBYP);
2291 }

◆ LL_RCC_LSE_EnableCSS()

__STATIC_INLINE void LL_RCC_LSE_EnableCSS ( void  )

Enable Clock security system on LSE. BDCR LSECSSON LL_RCC_LSE_EnableCSS.

Return values
None

Definition at line 2338 of file stm32l4xx_ll_rcc.h.

2339 {
2340  SET_BIT(RCC->BDCR, RCC_BDCR_LSECSSON);
2341 }

◆ LL_RCC_LSE_EnablePropagation()

__STATIC_INLINE void LL_RCC_LSE_EnablePropagation ( void  )

Enable LSE oscillator propagation.

Note
A 2 LSE-clock delay is needed for LSESYSDIS resetting to be taken into account BDCR LSESYSDIS LL_RCC_LSE_EnablePropagation
Return values
None

Definition at line 2394 of file stm32l4xx_ll_rcc.h.

2395 {
2396  CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSESYSDIS);
2397 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RCC_LSE_GetDriveCapability()

__STATIC_INLINE uint32_t LL_RCC_LSE_GetDriveCapability ( void  )

Get LSE oscillator drive capability BDCR LSEDRV LL_RCC_LSE_GetDriveCapability.

Return values
Returnedvalue can be one of the following values:
  • LL_RCC_LSEDRIVE_LOW
  • LL_RCC_LSEDRIVE_MEDIUMLOW
  • LL_RCC_LSEDRIVE_MEDIUMHIGH
  • LL_RCC_LSEDRIVE_HIGH

Definition at line 2328 of file stm32l4xx_ll_rcc.h.

2329 {
2330  return (uint32_t)(READ_BIT(RCC->BDCR, RCC_BDCR_LSEDRV));
2331 }

◆ LL_RCC_LSE_IsCSSDetected()

__STATIC_INLINE uint32_t LL_RCC_LSE_IsCSSDetected ( void  )

Check if CSS on LSE failure Detection BDCR LSECSSD LL_RCC_LSE_IsCSSDetected.

Return values
Stateof bit (1 or 0).

Definition at line 2370 of file stm32l4xx_ll_rcc.h.

2371 {
2372  return ((READ_BIT(RCC->BDCR, RCC_BDCR_LSECSSD) == RCC_BDCR_LSECSSD) ? 1UL : 0UL);
2373 }

◆ LL_RCC_LSE_IsPropagationEnabled()

__STATIC_INLINE uint32_t LL_RCC_LSE_IsPropagationEnabled ( void  )

Check if LSE oscillator propagation is enabled BDCR LSESYSDIS LL_RCC_LSE_IsPropagationEnabled.

Return values
Stateof bit (1 or 0).

Definition at line 2404 of file stm32l4xx_ll_rcc.h.

2405 {
2406  return ((READ_BIT(RCC->BDCR, RCC_BDCR_LSESYSDIS) == 0U) ? 1UL : 0UL);
2407 }

◆ LL_RCC_LSE_IsReady()

__STATIC_INLINE uint32_t LL_RCC_LSE_IsReady ( void  )

Check if LSE oscillator Ready BDCR LSERDY LL_RCC_LSE_IsReady.

Return values
Stateof bit (1 or 0).

Definition at line 2360 of file stm32l4xx_ll_rcc.h.

2361 {
2362  return ((READ_BIT(RCC->BDCR, RCC_BDCR_LSERDY) == RCC_BDCR_LSERDY) ? 1UL : 0UL);
2363 }

◆ LL_RCC_LSE_SetDriveCapability()

__STATIC_INLINE void LL_RCC_LSE_SetDriveCapability ( uint32_t  LSEDrive)

Set LSE oscillator drive capability.

Note
The oscillator is in Xtal mode when it is not in bypass mode. BDCR LSEDRV LL_RCC_LSE_SetDriveCapability
Parameters
LSEDriveThis parameter can be one of the following values:
  • LL_RCC_LSEDRIVE_LOW
  • LL_RCC_LSEDRIVE_MEDIUMLOW
  • LL_RCC_LSEDRIVE_MEDIUMHIGH
  • LL_RCC_LSEDRIVE_HIGH
Return values
None

Definition at line 2314 of file stm32l4xx_ll_rcc.h.

2315 {
2316  MODIFY_REG(RCC->BDCR, RCC_BDCR_LSEDRV, LSEDrive);
2317 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)