STM32L4xx_HAL_Driver  1.14.0

Functions

__STATIC_INLINE void LL_RCC_MSI_Enable (void)
 Enable MSI oscillator CR MSION LL_RCC_MSI_Enable. More...
 
__STATIC_INLINE void LL_RCC_MSI_Disable (void)
 Disable MSI oscillator CR MSION LL_RCC_MSI_Disable. More...
 
__STATIC_INLINE uint32_t LL_RCC_MSI_IsReady (void)
 Check if MSI oscillator Ready CR MSIRDY LL_RCC_MSI_IsReady. More...
 
__STATIC_INLINE void LL_RCC_MSI_EnablePLLMode (void)
 Enable MSI PLL-mode (Hardware auto calibration with LSE) More...
 
__STATIC_INLINE void LL_RCC_MSI_DisablePLLMode (void)
 Disable MSI-PLL mode. More...
 
__STATIC_INLINE void LL_RCC_MSI_EnableRangeSelection (void)
 Enable MSI clock range selection with MSIRANGE register. More...
 
__STATIC_INLINE uint32_t LL_RCC_MSI_IsEnabledRangeSelect (void)
 Check if MSI clock range is selected with MSIRANGE register CR MSIRGSEL LL_RCC_MSI_IsEnabledRangeSelect. More...
 
__STATIC_INLINE void LL_RCC_MSI_SetRange (uint32_t Range)
 Configure the Internal Multi Speed oscillator (MSI) clock range in run mode. CR MSIRANGE LL_RCC_MSI_SetRange. More...
 
__STATIC_INLINE uint32_t LL_RCC_MSI_GetRange (void)
 Get the Internal Multi Speed oscillator (MSI) clock range in run mode. CR MSIRANGE LL_RCC_MSI_GetRange. More...
 
__STATIC_INLINE void LL_RCC_MSI_SetRangeAfterStandby (uint32_t Range)
 Configure MSI range used after standby CSR MSISRANGE LL_RCC_MSI_SetRangeAfterStandby. More...
 
__STATIC_INLINE uint32_t LL_RCC_MSI_GetRangeAfterStandby (void)
 Get MSI range used after standby CSR MSISRANGE LL_RCC_MSI_GetRangeAfterStandby. More...
 
__STATIC_INLINE uint32_t LL_RCC_MSI_GetCalibration (void)
 Get MSI Calibration value. More...
 
__STATIC_INLINE void LL_RCC_MSI_SetCalibTrimming (uint32_t Value)
 Set MSI Calibration trimming. More...
 
__STATIC_INLINE uint32_t LL_RCC_MSI_GetCalibTrimming (void)
 Get MSI Calibration trimming ICSCR MSITRIM LL_RCC_MSI_GetCalibTrimming. More...
 

Detailed Description

Function Documentation

◆ LL_RCC_MSI_Disable()

__STATIC_INLINE void LL_RCC_MSI_Disable ( void  )

Disable MSI oscillator CR MSION LL_RCC_MSI_Disable.

Return values
None

Definition at line 2497 of file stm32l4xx_ll_rcc.h.

2498 {
2499  CLEAR_BIT(RCC->CR, RCC_CR_MSION);
2500 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RCC_MSI_DisablePLLMode()

__STATIC_INLINE void LL_RCC_MSI_DisablePLLMode ( void  )

Disable MSI-PLL mode.

Note
cleared by hardware when LSE is disabled (LSEON = 0) or when the Clock Security System on LSE detects a LSE failure CR MSIPLLEN LL_RCC_MSI_DisablePLLMode
Return values
None

Definition at line 2533 of file stm32l4xx_ll_rcc.h.

2534 {
2535  CLEAR_BIT(RCC->CR, RCC_CR_MSIPLLEN);
2536 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_RCC_MSI_Enable()

__STATIC_INLINE void LL_RCC_MSI_Enable ( void  )

Enable MSI oscillator CR MSION LL_RCC_MSI_Enable.

Return values
None

Definition at line 2487 of file stm32l4xx_ll_rcc.h.

2488 {
2489  SET_BIT(RCC->CR, RCC_CR_MSION);
2490 }

◆ LL_RCC_MSI_EnablePLLMode()

__STATIC_INLINE void LL_RCC_MSI_EnablePLLMode ( void  )

Enable MSI PLL-mode (Hardware auto calibration with LSE)

Note
MSIPLLEN must be enabled after LSE is enabled (LSEON enabled) and ready (LSERDY set by hardware)
hardware protection to avoid enabling MSIPLLEN if LSE is not ready CR MSIPLLEN LL_RCC_MSI_EnablePLLMode
Return values
None

Definition at line 2521 of file stm32l4xx_ll_rcc.h.

2522 {
2523  SET_BIT(RCC->CR, RCC_CR_MSIPLLEN);
2524 }

◆ LL_RCC_MSI_EnableRangeSelection()

__STATIC_INLINE void LL_RCC_MSI_EnableRangeSelection ( void  )

Enable MSI clock range selection with MSIRANGE register.

Note
Write 0 has no effect. After a standby or a reset MSIRGSEL is at 0 and the MSI range value is provided by MSISRANGE CR MSIRGSEL LL_RCC_MSI_EnableRangeSelection
Return values
None

Definition at line 2546 of file stm32l4xx_ll_rcc.h.

2547 {
2548  SET_BIT(RCC->CR, RCC_CR_MSIRGSEL);
2549 }

◆ LL_RCC_MSI_GetCalibration()

__STATIC_INLINE uint32_t LL_RCC_MSI_GetCalibration ( void  )

Get MSI Calibration value.

Note
When MSITRIM is written, MSICAL is updated with the sum of MSITRIM and the factory trim value ICSCR MSICAL LL_RCC_MSI_GetCalibration
Return values
BetweenMin_Data = 0 and Max_Data = 255

Definition at line 2642 of file stm32l4xx_ll_rcc.h.

2643 {
2644  return (uint32_t)(READ_BIT(RCC->ICSCR, RCC_ICSCR_MSICAL) >> RCC_ICSCR_MSICAL_Pos);
2645 }

◆ LL_RCC_MSI_GetCalibTrimming()

__STATIC_INLINE uint32_t LL_RCC_MSI_GetCalibTrimming ( void  )

Get MSI Calibration trimming ICSCR MSITRIM LL_RCC_MSI_GetCalibTrimming.

Return values
Between0 and 255

Definition at line 2664 of file stm32l4xx_ll_rcc.h.

2665 {
2666  return (uint32_t)(READ_BIT(RCC->ICSCR, RCC_ICSCR_MSITRIM) >> RCC_ICSCR_MSITRIM_Pos);
2667 }

◆ LL_RCC_MSI_GetRange()

__STATIC_INLINE uint32_t LL_RCC_MSI_GetRange ( void  )

Get the Internal Multi Speed oscillator (MSI) clock range in run mode. CR MSIRANGE LL_RCC_MSI_GetRange.

Return values
Returnedvalue can be one of the following values:
  • LL_RCC_MSIRANGE_0
  • LL_RCC_MSIRANGE_1
  • LL_RCC_MSIRANGE_2
  • LL_RCC_MSIRANGE_3
  • LL_RCC_MSIRANGE_4
  • LL_RCC_MSIRANGE_5
  • LL_RCC_MSIRANGE_6
  • LL_RCC_MSIRANGE_7
  • LL_RCC_MSIRANGE_8
  • LL_RCC_MSIRANGE_9
  • LL_RCC_MSIRANGE_10
  • LL_RCC_MSIRANGE_11

Definition at line 2601 of file stm32l4xx_ll_rcc.h.

2602 {
2603  return (uint32_t)(READ_BIT(RCC->CR, RCC_CR_MSIRANGE));
2604 }

◆ LL_RCC_MSI_GetRangeAfterStandby()

__STATIC_INLINE uint32_t LL_RCC_MSI_GetRangeAfterStandby ( void  )

Get MSI range used after standby CSR MSISRANGE LL_RCC_MSI_GetRangeAfterStandby.

Return values
Returnedvalue can be one of the following values:
  • LL_RCC_MSISRANGE_4
  • LL_RCC_MSISRANGE_5
  • LL_RCC_MSISRANGE_6
  • LL_RCC_MSISRANGE_7

Definition at line 2630 of file stm32l4xx_ll_rcc.h.

2631 {
2632  return (uint32_t)(READ_BIT(RCC->CSR, RCC_CSR_MSISRANGE));
2633 }

◆ LL_RCC_MSI_IsEnabledRangeSelect()

__STATIC_INLINE uint32_t LL_RCC_MSI_IsEnabledRangeSelect ( void  )

Check if MSI clock range is selected with MSIRANGE register CR MSIRGSEL LL_RCC_MSI_IsEnabledRangeSelect.

Return values
Stateof bit (1 or 0).

Definition at line 2556 of file stm32l4xx_ll_rcc.h.

2557 {
2558  return ((READ_BIT(RCC->CR, RCC_CR_MSIRGSEL) == RCC_CR_MSIRGSEL) ? 1UL : 0UL);
2559 }

◆ LL_RCC_MSI_IsReady()

__STATIC_INLINE uint32_t LL_RCC_MSI_IsReady ( void  )

Check if MSI oscillator Ready CR MSIRDY LL_RCC_MSI_IsReady.

Return values
Stateof bit (1 or 0).

Definition at line 2507 of file stm32l4xx_ll_rcc.h.

2508 {
2509  return ((READ_BIT(RCC->CR, RCC_CR_MSIRDY) == RCC_CR_MSIRDY) ? 1UL : 0UL);
2510 }

◆ LL_RCC_MSI_SetCalibTrimming()

__STATIC_INLINE void LL_RCC_MSI_SetCalibTrimming ( uint32_t  Value)

Set MSI Calibration trimming.

Note
user-programmable trimming value that is added to the MSICAL ICSCR MSITRIM LL_RCC_MSI_SetCalibTrimming
Parameters
ValueBetween Min_Data = 0 and Max_Data = 255
Return values
None

Definition at line 2654 of file stm32l4xx_ll_rcc.h.

2655 {
2656  MODIFY_REG(RCC->ICSCR, RCC_ICSCR_MSITRIM, Value << RCC_ICSCR_MSITRIM_Pos);
2657 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RCC_MSI_SetRange()

__STATIC_INLINE void LL_RCC_MSI_SetRange ( uint32_t  Range)

Configure the Internal Multi Speed oscillator (MSI) clock range in run mode. CR MSIRANGE LL_RCC_MSI_SetRange.

Parameters
RangeThis parameter can be one of the following values:
  • LL_RCC_MSIRANGE_0
  • LL_RCC_MSIRANGE_1
  • LL_RCC_MSIRANGE_2
  • LL_RCC_MSIRANGE_3
  • LL_RCC_MSIRANGE_4
  • LL_RCC_MSIRANGE_5
  • LL_RCC_MSIRANGE_6
  • LL_RCC_MSIRANGE_7
  • LL_RCC_MSIRANGE_8
  • LL_RCC_MSIRANGE_9
  • LL_RCC_MSIRANGE_10
  • LL_RCC_MSIRANGE_11
Return values
None

Definition at line 2579 of file stm32l4xx_ll_rcc.h.

2580 {
2581  MODIFY_REG(RCC->CR, RCC_CR_MSIRANGE, Range);
2582 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)

◆ LL_RCC_MSI_SetRangeAfterStandby()

__STATIC_INLINE void LL_RCC_MSI_SetRangeAfterStandby ( uint32_t  Range)

Configure MSI range used after standby CSR MSISRANGE LL_RCC_MSI_SetRangeAfterStandby.

Parameters
RangeThis parameter can be one of the following values:
  • LL_RCC_MSISRANGE_4
  • LL_RCC_MSISRANGE_5
  • LL_RCC_MSISRANGE_6
  • LL_RCC_MSISRANGE_7
Return values
None

Definition at line 2616 of file stm32l4xx_ll_rcc.h.

2617 {
2618  MODIFY_REG(RCC->CSR, RCC_CSR_MSISRANGE, Range);
2619 }
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)