STM32F4xx_HAL_Driver  1.8.3
Extended Peripheral Control functions

Extended Peripheral Control functions. More...

+ Collaboration diagram for Extended Peripheral Control functions:

Modules

 Extended Clock management functions
 Extended Clock management functions.
 

Functions

HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig (RCC_PeriphCLKInitTypeDef *PeriphClkInit)
 Initializes the RCC extended peripherals clocks according to the specified parameters in the RCC_PeriphCLKInitTypeDef. More...
 
void HAL_RCCEx_GetPeriphCLKConfig (RCC_PeriphCLKInitTypeDef *PeriphClkInit)
 Get the RCC_PeriphCLKInitTypeDef according to the internal RCC configuration registers. More...
 
uint32_t HAL_RCCEx_GetPeriphCLKFreq (uint32_t PeriphClk)
 Return the peripheral clock frequency for a given peripheral(SAI..) More...
 
void HAL_RCCEx_SelectLSEMode (uint8_t Mode)
 Select LSE mode. More...
 
HAL_StatusTypeDef HAL_RCCEx_EnablePLLI2S (RCC_PLLI2SInitTypeDef *PLLI2SInit)
 Enable PLLI2S. More...
 
HAL_StatusTypeDef HAL_RCCEx_DisablePLLI2S (void)
 Disable PLLI2S. More...
 
HAL_StatusTypeDef HAL_RCCEx_EnablePLLSAI (RCC_PLLSAIInitTypeDef *PLLSAIInit)
 Enable PLLSAI. More...
 
HAL_StatusTypeDef HAL_RCCEx_DisablePLLSAI (void)
 Disable PLLSAI. More...
 
uint32_t HAL_RCC_GetSysClockFreq (void)
 Returns the SYSCLK frequency. More...
 

Detailed Description

Extended Peripheral Control functions.

 ===============================================================================
                ##### Extended Peripheral Control functions  #####
 ===============================================================================
    [..]
    This subsection provides a set of functions allowing to control the RCC Clocks
    frequencies.
    [..]
    (@) Important note: Care must be taken when HAL_RCCEx_PeriphCLKConfig() is used to
        select the RTC clock source; in this case the Backup domain will be reset in
        order to modify the RTC Clock source, as consequence RTC registers (including
        the backup registers) and RCC_BDCR register are set to their reset values.

Function Documentation

◆ HAL_RCC_GetSysClockFreq()

uint32_t HAL_RCC_GetSysClockFreq ( void  )

Returns the SYSCLK frequency.

Note
This function implementation is valid only for STM32F446xx devices.
This function add the PLL/PLLR System clock source
The system frequency computed by this function is not the real frequency in the chip. It is calculated based on the predefined constant and the selected clock source:
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 or PLLR, function returns values based on HSE_VALUE(**) or HSI_VALUE(*) multiplied/divided by the PLL factors.
(*) HSI_VALUE is a constant defined in stm32f4xx_hal_conf.h 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 stm32f4xx_hal_conf.h 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 not correct when using fractional value for HSE crystal.
This function can be used by the user application to compute the baudrate for the communication peripherals or configure other parameters.
Each time SYSCLK changes, this function must be called to update the right SYSCLK value. Otherwise, any configuration based on this function will be incorrect.
Return values
SYSCLKfrequency

Definition at line 3094 of file stm32f4xx_hal_rcc_ex.c.

◆ HAL_RCCEx_DisablePLLI2S()

HAL_StatusTypeDef HAL_RCCEx_DisablePLLI2S ( void  )

Disable PLLI2S.

Return values
HALstatus

Definition at line 2929 of file stm32f4xx_hal_rcc_ex.c.

◆ HAL_RCCEx_DisablePLLSAI()

HAL_StatusTypeDef HAL_RCCEx_DisablePLLSAI ( void  )

Disable PLLSAI.

Return values
HALstatus

Definition at line 3033 of file stm32f4xx_hal_rcc_ex.c.

◆ HAL_RCCEx_EnablePLLI2S()

HAL_StatusTypeDef HAL_RCCEx_EnablePLLI2S ( RCC_PLLI2SInitTypeDef PLLI2SInit)

Enable PLLI2S.

Parameters
PLLI2SInitpointer to an RCC_PLLI2SInitTypeDef structure that contains the configuration information for the PLLI2S
Return values
HALstatus

Definition at line 2846 of file stm32f4xx_hal_rcc_ex.c.

◆ HAL_RCCEx_EnablePLLSAI()

HAL_StatusTypeDef HAL_RCCEx_EnablePLLSAI ( RCC_PLLSAIInitTypeDef PLLSAIInit)

Enable PLLSAI.

Parameters
PLLSAIInitpointer to an RCC_PLLSAIInitTypeDef structure that contains the configuration information for the PLLSAI
Return values
HALstatus

Definition at line 2959 of file stm32f4xx_hal_rcc_ex.c.

◆ HAL_RCCEx_GetPeriphCLKConfig()

void HAL_RCCEx_GetPeriphCLKConfig ( RCC_PeriphCLKInitTypeDef PeriphClkInit)

Get the RCC_PeriphCLKInitTypeDef according to the internal RCC configuration registers.

Configures the PeriphClkInit according to the internal RCC configuration registers.

Configures the RCC_OscInitStruct according to the internal RCC configuration registers.

Configures the RCC_PeriphCLKInitTypeDef according to the internal RCC configuration registers.

Parameters
PeriphClkInitpointer to an RCC_PeriphCLKInitTypeDef structure that will be configured.
Return values
None

Definition at line 500 of file stm32f4xx_hal_rcc_ex.c.

◆ HAL_RCCEx_GetPeriphCLKFreq()

uint32_t HAL_RCCEx_GetPeriphCLKFreq ( uint32_t  PeriphClk)

Return the peripheral clock frequency for a given peripheral(SAI..)

Return the peripheral clock frequency for a given peripheral(I2S..)

Note
Return 0 if peripheral clock identifier not managed by this API
Parameters
PeriphClkPeripheral clock identifier This parameter can be one of the following values:
  • RCC_PERIPHCLK_SAI1: SAI1 peripheral clock
  • RCC_PERIPHCLK_SAI2: SAI2 peripheral clock
  • RCC_PERIPHCLK_I2S_APB1: I2S APB1 peripheral clock
  • RCC_PERIPHCLK_I2S_APB2: I2S APB2 peripheral clock
Return values
Frequencyin KHz
Note
Return 0 if peripheral clock identifier not managed by this API
Parameters
PeriphClkPeripheral clock identifier This parameter can be one of the following values:
  • RCC_PERIPHCLK_I2S: I2S peripheral clock
Return values
Frequencyin KHz
Note
Return 0 if peripheral clock identifier not managed by this API
Parameters
PeriphClkPeripheral clock identifier This parameter can be one of the following values:
  • RCC_PERIPHCLK_I2S_APB1: I2S APB1 peripheral clock
  • RCC_PERIPHCLK_I2S_APB2: I2S APB2 peripheral clock
Return values
Frequencyin KHz

Definition at line 580 of file stm32f4xx_hal_rcc_ex.c.

◆ HAL_RCCEx_PeriphCLKConfig()

HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig ( RCC_PeriphCLKInitTypeDef PeriphClkInit)

Initializes the RCC extended peripherals clocks according to the specified parameters in the RCC_PeriphCLKInitTypeDef.

Parameters
PeriphClkInitpointer to an RCC_PeriphCLKInitTypeDef structure that contains the configuration information for the Extended Peripherals clocks(I2S, SAI, LTDC RTC and TIM).
Note
Care must be taken when HAL_RCCEx_PeriphCLKConfig() is used to select the RTC clock source; in this case the Backup domain will be reset in order to modify the RTC Clock source, as consequence RTC registers (including the backup registers) and RCC_BDCR register are set to their reset values.
Return values
HALstatus
Parameters
PeriphClkInitpointer to an RCC_PeriphCLKInitTypeDef structure that contains the configuration information for the Extended Peripherals clocks(I2S, SAI, LTDC, RTC and TIM).
Note
Care must be taken when HAL_RCCEx_PeriphCLKConfig() is used to select the RTC clock source; in this case the Backup domain will be reset in order to modify the RTC Clock source, as consequence RTC registers (including the backup registers) and RCC_BDCR register are set to their reset values.
Return values
HALstatus
Parameters
PeriphClkInitpointer to an RCC_PeriphCLKInitTypeDef structure that contains the configuration information for the Extended Peripherals clocks(I2S, LTDC RTC and TIM).
Note
Care must be taken when HAL_RCCEx_PeriphCLKConfig() is used to select the RTC clock source; in this case the Backup domain will be reset in order to modify the RTC Clock source, as consequence RTC registers (including the backup registers) and RCC_BDCR register are set to their reset values.
Return values
HALstatus
Parameters
PeriphClkInitpointer to an RCC_PeriphCLKInitTypeDef structure that contains the configuration information for the Extended Peripherals clocks(I2S and RTC clocks).
Note
A caution to be taken when HAL_RCCEx_PeriphCLKConfig() is used to select RTC clock selection, in this case the Reset of Backup domain will be applied in order to modify the RTC Clock source as consequence all backup domain (RTC and RCC_BDCR register expect BKPSRAM) will be reset
Return values
HALstatus

Definition at line 87 of file stm32f4xx_hal_rcc_ex.c.

◆ HAL_RCCEx_SelectLSEMode()

void HAL_RCCEx_SelectLSEMode ( uint8_t  Mode)

Select LSE mode.

Note
This mode is only available for STM32F410xx/STM32F411xx/STM32F446xx/STM32F469xx/STM32F479xx/STM32F412Zx/STM32F412Vx/STM32F412Rx/STM32F412Cx devices.
Parameters
Modespecifies the LSE mode. This parameter can be one of the following values:
  • RCC_LSE_LOWPOWER_MODE: LSE oscillator in low power mode selection
  • RCC_LSE_HIGHDRIVE_MODE: LSE oscillator in High Drive mode selection
Return values
None

Definition at line 2809 of file stm32f4xx_hal_rcc_ex.c.