STM32F439xx HAL User Manual
Functions
Get system and peripherals clocks frequency functions
RCC Exported 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...

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.
uint32_t LL_RCC_GetI2SClockFreq (uint32_t I2SxSource)
 Return I2Sx clock frequency.
uint32_t LL_RCC_GetSAIClockFreq (uint32_t SAIxSource)
 Return SAIx clock frequency.
uint32_t LL_RCC_GetSDIOClockFreq (uint32_t SDIOxSource)
 Return SDIOx clock frequency.
uint32_t LL_RCC_GetRNGClockFreq (uint32_t RNGxSource)
 Return RNGx clock frequency.
uint32_t LL_RCC_GetUSBClockFreq (uint32_t USBxSource)
 Return USBx clock frequency.
uint32_t LL_RCC_GetLTDCClockFreq (uint32_t LTDCxSource)
 Return LTDC clock frequency.

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

uint32_t LL_RCC_GetI2SClockFreq ( uint32_t  I2SxSource)

Return I2Sx clock frequency.

Parameters:
I2SxSourceThis parameter can be one of the following values: (*) value not defined in all devices.
Return values:
I2Sclock frequency (in Hz)

Definition at line 385 of file stm32f4xx_ll_rcc.c.

References assert_param, EXTERNAL_CLOCK_VALUE, HSE_VALUE, HSI_VALUE, IS_LL_RCC_I2S_CLKSOURCE, LL_RCC_GetI2SClockSource(), LL_RCC_HSE_IsReady(), LL_RCC_HSI_IsReady(), LL_RCC_I2S1_CLKSOURCE, LL_RCC_I2S1_CLKSOURCE_PIN, LL_RCC_I2S1_CLKSOURCE_PLLI2S, LL_RCC_PERIPH_FREQUENCY_NO, LL_RCC_PLL_GetMainSource(), LL_RCC_PLL_IsReady(), LL_RCC_PLLI2S_IsReady(), LL_RCC_PLLSOURCE_HSE, LL_RCC_PLLSOURCE_HSI, and RCC_PLLI2S_GetFreqDomain_I2S().

Referenced by LL_I2S_Init().

uint32_t LL_RCC_GetLTDCClockFreq ( uint32_t  LTDCxSource)

Return LTDC clock frequency.

Parameters:
LTDCxSourceThis parameter can be one of the following values:
Return values:
LTDCclock frequency (in Hz)

Definition at line 1064 of file stm32f4xx_ll_rcc.c.

References assert_param, IS_LL_RCC_LTDC_CLKSOURCE, LL_RCC_PERIPH_FREQUENCY_NO, LL_RCC_PLLSAI_IsReady(), and RCC_PLLSAI_GetFreqDomain_LTDC().

uint32_t LL_RCC_GetRNGClockFreq ( uint32_t  RNGxSource)

Return RNGx clock frequency.

Parameters:
RNGxSourceThis parameter can be one of the following values:
Return values:
RNGclock frequency (in Hz)

Definition at line 768 of file stm32f4xx_ll_rcc.c.

References assert_param, IS_LL_RCC_RNG_CLKSOURCE, LL_RCC_PERIPH_FREQUENCY_NO, LL_RCC_PLL_IsReady(), LL_RCC_PLLI2S_IsReady(), LL_RCC_PLLSAI_IsReady(), and RCC_PLL_GetFreqDomain_48M().

uint32_t LL_RCC_GetSAIClockFreq ( uint32_t  SAIxSource)
uint32_t LL_RCC_GetSDIOClockFreq ( uint32_t  SDIOxSource)

Return SDIOx clock frequency.

Parameters:
SDIOxSourceThis parameter can be one of the following values:
Return values:
SDIOclock frequency (in Hz)

Definition at line 697 of file stm32f4xx_ll_rcc.c.

References assert_param, IS_LL_RCC_SDIO_CLKSOURCE, LL_RCC_PERIPH_FREQUENCY_NO, LL_RCC_PLL_IsReady(), LL_RCC_PLLI2S_IsReady(), LL_RCC_PLLSAI_IsReady(), LL_RCC_SDIO_CLKSOURCE, RCC_GetSystemClockFreq(), and RCC_PLL_GetFreqDomain_48M().

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 318 of file stm32f4xx_ll_rcc.c.

References LL_RCC_ClocksTypeDef::HCLK_Frequency, LL_RCC_ClocksTypeDef::PCLK1_Frequency, LL_RCC_ClocksTypeDef::PCLK2_Frequency, RCC_GetHCLKClockFreq(), RCC_GetPCLK1ClockFreq(), RCC_GetPCLK2ClockFreq(), RCC_GetSystemClockFreq(), and LL_RCC_ClocksTypeDef::SYSCLK_Frequency.

Referenced by LL_I2C_Init(), and LL_USART_Init().

uint32_t LL_RCC_GetUSBClockFreq ( uint32_t  USBxSource)

Return USBx clock frequency.

Parameters:
USBxSourceThis parameter can be one of the following values:
Return values:
USBclock frequency (in Hz)

Definition at line 863 of file stm32f4xx_ll_rcc.c.

References assert_param, IS_LL_RCC_USB_CLKSOURCE, LL_RCC_PERIPH_FREQUENCY_NO, LL_RCC_PLL_IsReady(), LL_RCC_PLLI2S_IsReady(), LL_RCC_PLLSAI_IsReady(), and RCC_PLL_GetFreqDomain_48M().