TUKS MCU Introductory course / TUKS-COURSE-2-LED
Embed: (wiki syntax)

« Back to documentation index

Extended Peripheral Control functions

Extended Peripheral Control functions
[RCCEx Exported Functions]

Extended Peripheral Control functions. More...

Functions

HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig (RCC_PeriphCLKInitTypeDef *PeriphClkInit)
 Initialize the RCC extended peripherals clocks according to the specified parameters in the RCC_PeriphCLKInitTypeDef.
void HAL_RCCEx_GetPeriphCLKConfig (RCC_PeriphCLKInitTypeDef *PeriphClkInit)
 Get the RCC_ClkInitStruct according to the internal RCC configuration registers.
uint32_t HAL_RCCEx_GetPeriphCLKFreq (uint32_t PeriphClk)
 Return the peripheral clock frequency for peripherals with clock source from PLLSAIs.

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) are set to their reset values.


Function Documentation

void HAL_RCCEx_GetPeriphCLKConfig ( RCC_PeriphCLKInitTypeDef *  PeriphClkInit )

Get the RCC_ClkInitStruct according to the internal RCC configuration registers.

Parameters:
PeriphClkInitpointer to an RCC_PeriphCLKInitTypeDef structure that returns the configuration information for the Extended Peripherals clocks(SAI1, SAI2, LPTIM1, LPTIM2, I2C1, I2C2, I2C3, LPUART, USART1, USART2, USART3, UART4, UART5, RTC, ADCx, DFSDMx, SWPMI1, USB, SDMMC1 and RNG).
Return values:
None

Definition at line 643 of file stm32l4xx_hal_rcc_ex.c.

uint32_t HAL_RCCEx_GetPeriphCLKFreq ( uint32_t  PeriphClk )

Return the peripheral clock frequency for peripherals with clock source from PLLSAIs.

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_RTC RTC peripheral clock
  • RCC_PERIPHCLK_ADC ADC peripheral clock
  • RCC_PERIPHCLK_I2C1 I2C1 peripheral clock
  • RCC_PERIPHCLK_I2C2 I2C2 peripheral clock
  • RCC_PERIPHCLK_I2C3 I2C3 peripheral clock
  • RCC_PERIPHCLK_LPTIM1 LPTIM1 peripheral clock
  • RCC_PERIPHCLK_LPTIM2 LPTIM2 peripheral clock
  • RCC_PERIPHCLK_LPUART1 LPUART1 peripheral clock
  • RCC_PERIPHCLK_RNG RNG peripheral clock
  • RCC_PERIPHCLK_SAI1 SAI1 peripheral clock
  • RCC_PERIPHCLK_SDMMC1 SDMMC1 peripheral clock
  • RCC_PERIPHCLK_SWPMI1 SWPMI1 peripheral clock
  • RCC_PERIPHCLK_USART1 USART1 peripheral clock
  • RCC_PERIPHCLK_USART2 USART1 peripheral clock
  • RCC_PERIPHCLK_USART3 USART1 peripheral clock
Return values:
Frequencyin Hz

Definition at line 820 of file stm32l4xx_hal_rcc_ex.c.

HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig ( RCC_PeriphCLKInitTypeDef *  PeriphClkInit )

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

Parameters:
PeriphClkInitpointer to an RCC_PeriphCLKInitTypeDef structure that contains a field PeriphClockSelection which can be a combination of the following values:

  • RCC_PERIPHCLK_RTC RTC peripheral clock
  • RCC_PERIPHCLK_ADC ADC peripheral clock
  • RCC_PERIPHCLK_I2C1 I2C1 peripheral clock
  • RCC_PERIPHCLK_I2C2 I2C2 peripheral clock
  • RCC_PERIPHCLK_I2C3 I2C3 peripheral clock
  • RCC_PERIPHCLK_LPTIM1 LPTIM1 peripheral clock
  • RCC_PERIPHCLK_LPTIM2 LPTIM2 peripheral clock
  • RCC_PERIPHCLK_LPUART1 LPUART1 peripheral clock
  • RCC_PERIPHCLK_RNG RNG peripheral clock
  • RCC_PERIPHCLK_SAI1 SAI1 peripheral clock
  • RCC_PERIPHCLK_SDMMC1 SDMMC1 peripheral clock
  • RCC_PERIPHCLK_USART1 USART1 peripheral clock
  • RCC_PERIPHCLK_USART2 USART1 peripheral clock
  • RCC_PERIPHCLK_USART3 USART1 peripheral clock
Note:
Care must be taken when HAL_RCCEx_PeriphCLKConfig() is used to select the RTC clock source: in this case the access to Backup domain is enabled.
Return values:
HALstatus

Definition at line 163 of file stm32l4xx_hal_rcc_ex.c.