STM32F4xx_HAL_Driver  1.8.3
Get system and peripherals clocks frequency functions

Return the frequencies of different on chip clocks; System, AHB, APB1 and APB2 buses clocks and different peripheral clocks available on the device. More...

+ Collaboration diagram for Get system and peripherals clocks frequency functions:

Functions

void LL_RCC_GetSystemClocksFreq (LL_RCC_ClocksTypeDef *RCC_Clocks)
 Return the frequencies of different on chip clocks; System, AHB, APB1 and APB2 buses clocks. More...
 
uint32_t LL_RCC_GetFMPI2CClockFreq (uint32_t FMPI2CxSource)
 Return FMPI2Cx clock frequency. More...
 
uint32_t LL_RCC_GetLPTIMClockFreq (uint32_t LPTIMxSource)
 Return LPTIMx clock frequency. More...
 
uint32_t LL_RCC_GetSAIClockFreq (uint32_t SAIxSource)
 Return SAIx clock frequency. More...
 
uint32_t LL_RCC_GetSDIOClockFreq (uint32_t SDIOxSource)
 Return SDIOx clock frequency. More...
 
uint32_t LL_RCC_GetRNGClockFreq (uint32_t RNGxSource)
 Return RNGx clock frequency. More...
 
uint32_t LL_RCC_GetUSBClockFreq (uint32_t USBxSource)
 Return USBx clock frequency. More...
 
uint32_t LL_RCC_GetDFSDMClockFreq (uint32_t DFSDMxSource)
 Return DFSDMx clock frequency. More...
 
uint32_t LL_RCC_GetDFSDMAudioClockFreq (uint32_t DFSDMxSource)
 Return DFSDMx Audio clock frequency. More...
 
uint32_t LL_RCC_GetI2SClockFreq (uint32_t I2SxSource)
 Return I2Sx clock frequency. More...
 
uint32_t LL_RCC_GetCECClockFreq (uint32_t CECxSource)
 Return CEC clock frequency. More...
 
uint32_t LL_RCC_GetLTDCClockFreq (uint32_t LTDCxSource)
 Return LTDC clock frequency. More...
 
uint32_t LL_RCC_GetSPDIFRXClockFreq (uint32_t SPDIFRXxSource)
 Return SPDIFRX clock frequency. More...
 
uint32_t LL_RCC_GetDSIClockFreq (uint32_t DSIxSource)
 Return DSI clock frequency. More...
 

Detailed Description

Return the frequencies of different on chip clocks; System, AHB, APB1 and APB2 buses clocks and different peripheral clocks available on the device.

Note
If SYSCLK source is HSI, function returns values based on HSI_VALUE(**)
If SYSCLK source is HSE, function returns values based on HSE_VALUE(***)
If SYSCLK source is PLL, function returns values based on HSE_VALUE(***) or HSI_VALUE(**) multiplied/divided by the PLL factors.
(**) HSI_VALUE is a constant defined in this file (default value 16 MHz) but the real value may vary depending on the variations in voltage and temperature.
(***) HSE_VALUE is a constant defined in this file (default value 25 MHz), user has to ensure that HSE_VALUE is same as the real frequency of the crystal used. Otherwise, this function may have wrong result.
The result of this function could be incorrect when using fractional value for HSE crystal.
This function can be used by the user application to compute the baud-rate for the communication peripherals or configure other parameters.

Function Documentation

◆ LL_RCC_GetCECClockFreq()

uint32_t LL_RCC_GetCECClockFreq ( uint32_t  CECxSource)

Return CEC clock frequency.

Parameters
CECxSourceThis parameter can be one of the following values:
  • LL_RCC_CEC_CLKSOURCE
Return values
CECclock frequency (in Hz)
  • LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator (HSI or LSE) is not ready

Definition at line 810 of file stm32f4xx_ll_rcc.c.

◆ LL_RCC_GetDFSDMAudioClockFreq()

uint32_t LL_RCC_GetDFSDMAudioClockFreq ( uint32_t  DFSDMxSource)

Return DFSDMx Audio clock frequency.

Parameters
DFSDMxSourceThis parameter can be one of the following values:
  • LL_RCC_DFSDM1_AUDIO_CLKSOURCE
  • LL_RCC_DFSDM2_AUDIO_CLKSOURCE (*)
(*) value not defined in all devices.
Return values
DFSDMclock frequency (in Hz)
  • LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator is not ready

Definition at line 961 of file stm32f4xx_ll_rcc.c.

◆ LL_RCC_GetDFSDMClockFreq()

uint32_t LL_RCC_GetDFSDMClockFreq ( uint32_t  DFSDMxSource)

Return DFSDMx clock frequency.

Parameters
DFSDMxSourceThis parameter can be one of the following values:
  • LL_RCC_DFSDM1_CLKSOURCE
  • LL_RCC_DFSDM2_CLKSOURCE (*)
(*) value not defined in all devices.
Return values
DFSDMclock frequency (in Hz)

Definition at line 908 of file stm32f4xx_ll_rcc.c.

◆ LL_RCC_GetDSIClockFreq()

uint32_t LL_RCC_GetDSIClockFreq ( uint32_t  DSIxSource)

Return DSI clock frequency.

Parameters
DSIxSourceThis parameter can be one of the following values:
  • LL_RCC_DSI_CLKSOURCE
Return values
DSIclock frequency (in Hz)
  • LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator is not ready
  • LL_RCC_PERIPH_FREQUENCY_NA indicates that external clock is used

Definition at line 1014 of file stm32f4xx_ll_rcc.c.

◆ LL_RCC_GetFMPI2CClockFreq()

uint32_t LL_RCC_GetFMPI2CClockFreq ( uint32_t  FMPI2CxSource)

Return FMPI2Cx clock frequency.

Parameters
FMPI2CxSourceThis parameter can be one of the following values:
  • LL_RCC_FMPI2C1_CLKSOURCE
Return values
FMPI2Cclock frequency (in Hz)
  • LL_RCC_PERIPH_FREQUENCY_NO indicates that HSI oscillator is not ready

Definition at line 326 of file stm32f4xx_ll_rcc.c.

◆ LL_RCC_GetI2SClockFreq()

uint32_t LL_RCC_GetI2SClockFreq ( uint32_t  I2SxSource)

Return I2Sx clock frequency.

Parameters
I2SxSourceThis parameter can be one of the following values:
  • LL_RCC_I2S1_CLKSOURCE
  • LL_RCC_I2S2_CLKSOURCE (*)
(*) value not defined in all devices.
Return values
I2Sclock frequency (in Hz)
  • LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator is not ready

Definition at line 370 of file stm32f4xx_ll_rcc.c.

◆ LL_RCC_GetLPTIMClockFreq()

uint32_t LL_RCC_GetLPTIMClockFreq ( uint32_t  LPTIMxSource)

Return LPTIMx clock frequency.

Parameters
LPTIMxSourceThis parameter can be one of the following values:
  • LL_RCC_LPTIM1_CLKSOURCE
Return values
LPTIMclock frequency (in Hz)
  • LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator (HSI, LSI or LSE) is not ready

Definition at line 485 of file stm32f4xx_ll_rcc.c.

◆ LL_RCC_GetLTDCClockFreq()

uint32_t LL_RCC_GetLTDCClockFreq ( uint32_t  LTDCxSource)

Return LTDC clock frequency.

Parameters
LTDCxSourceThis parameter can be one of the following values:
  • LL_RCC_LTDC_CLKSOURCE
Return values
LTDCclock frequency (in Hz)
  • LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator PLLSAI is not ready

Definition at line 1049 of file stm32f4xx_ll_rcc.c.

◆ LL_RCC_GetRNGClockFreq()

uint32_t LL_RCC_GetRNGClockFreq ( uint32_t  RNGxSource)

Return RNGx clock frequency.

Parameters
RNGxSourceThis parameter can be one of the following values:
  • LL_RCC_RNG_CLKSOURCE
Return values
RNGclock frequency (in Hz)
  • LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator is not ready

Definition at line 753 of file stm32f4xx_ll_rcc.c.

◆ LL_RCC_GetSAIClockFreq()

uint32_t LL_RCC_GetSAIClockFreq ( uint32_t  SAIxSource)

Return SAIx clock frequency.

Parameters
SAIxSourceThis parameter can be one of the following values:
  • LL_RCC_SAI1_CLKSOURCE (*)
  • LL_RCC_SAI2_CLKSOURCE (*)
  • LL_RCC_SAI1_A_CLKSOURCE (*)
  • LL_RCC_SAI1_B_CLKSOURCE (*)
(*) value not defined in all devices.
Return values
SAIclock frequency (in Hz)
  • LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator is not ready

Definition at line 542 of file stm32f4xx_ll_rcc.c.

◆ LL_RCC_GetSDIOClockFreq()

uint32_t LL_RCC_GetSDIOClockFreq ( uint32_t  SDIOxSource)

Return SDIOx clock frequency.

Parameters
SDIOxSourceThis parameter can be one of the following values:
  • LL_RCC_SDIO_CLKSOURCE
Return values
SDIOclock frequency (in Hz)
  • LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator is not ready

Definition at line 682 of file stm32f4xx_ll_rcc.c.

◆ LL_RCC_GetSPDIFRXClockFreq()

uint32_t LL_RCC_GetSPDIFRXClockFreq ( uint32_t  SPDIFRXxSource)

Return SPDIFRX clock frequency.

Parameters
SPDIFRXxSourceThis parameter can be one of the following values:
  • LL_RCC_SPDIFRX1_CLKSOURCE
Return values
SPDIFRXclock frequency (in Hz)
  • LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator is not ready

Definition at line 1073 of file stm32f4xx_ll_rcc.c.

◆ LL_RCC_GetSystemClocksFreq()

void LL_RCC_GetSystemClocksFreq ( LL_RCC_ClocksTypeDef RCC_Clocks)

Return the frequencies of different on chip clocks; System, AHB, APB1 and APB2 buses clocks.

Note
Each time SYSCLK, HCLK, PCLK1 and/or PCLK2 clock changes, this function must be called to update structure fields. Otherwise, any configuration based on this function will be incorrect.
Parameters
RCC_Clockspointer to a LL_RCC_ClocksTypeDef structure which will hold the clocks frequencies
Return values
None

Definition at line 303 of file stm32f4xx_ll_rcc.c.

◆ LL_RCC_GetUSBClockFreq()

uint32_t LL_RCC_GetUSBClockFreq ( uint32_t  USBxSource)

Return USBx clock frequency.

Parameters
USBxSourceThis parameter can be one of the following values:
  • LL_RCC_USB_CLKSOURCE
Return values
USBclock frequency (in Hz)
  • LL_RCC_PERIPH_FREQUENCY_NO indicates that oscillator is not ready

Definition at line 848 of file stm32f4xx_ll_rcc.c.