Go to the documentation of this file.
36 #ifdef HAL_RCC_MODULE_ENABLED
90 #if defined (STM32F745xx) || defined (STM32F746xx) || defined (STM32F756xx) || defined (STM32F765xx) || \
91 defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) || defined (STM32F779xx) || \
109 uint32_t tickstart = 0;
110 uint32_t tmpreg0 = 0;
111 uint32_t tmpreg1 = 0;
112 uint32_t plli2sused = 0;
113 uint32_t pllsaiused = 0;
396 #if defined(STM32F746xx) || defined(STM32F756xx) || defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) || defined (STM32F779xx) || defined (STM32F750xx)
423 #if defined (STM32F765xx) || defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) || defined (STM32F779xx)
428 assert_param(IS_RCC_SDMMC2CLKSOURCE(PeriphClkInit->Sdmmc2ClockSelection));
431 __HAL_RCC_SDMMC2_CONFIG(PeriphClkInit->Sdmmc2ClockSelection);
445 if(((PeriphClkInit->
PeriphClockSelection) & RCC_PERIPHCLK_DFSDM1_AUDIO) == RCC_PERIPHCLK_DFSDM1_AUDIO)
448 assert_param(IS_RCC_DFSDM1AUDIOCLKSOURCE(PeriphClkInit->Dfsdm1AudioClockSelection));
451 __HAL_RCC_DFSDM1AUDIO_CONFIG(PeriphClkInit->Dfsdm1AudioClockSelection);
621 #if defined(STM32F746xx) || defined(STM32F756xx) || defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) || defined (STM32F779xx) || defined (STM32F750xx)
638 __HAL_RCC_PLLSAI_PLLSAICLKDIVR_CONFIG(PeriphClkInit->
PLLSAIDivR);
669 uint32_t tempreg = 0;
672 #if defined (STM32F765xx) || defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) || defined (STM32F779xx)
683 RCC_PERIPHCLK_CLK48 | RCC_PERIPHCLK_SDMMC2 |\
684 RCC_PERIPHCLK_DFSDM1 | RCC_PERIPHCLK_DFSDM1_AUDIO;
773 #if defined (STM32F765xx) || defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) || defined (STM32F779xx)
775 PeriphClkInit->Sdmmc2ClockSelection = __HAL_RCC_GET_SDMMC2_SOURCE();
781 PeriphClkInit->Dfsdm1AudioClockSelection = __HAL_RCC_GET_DFSDM1AUDIO_SOURCE();
800 #if defined (STM32F722xx) || defined (STM32F723xx) || defined (STM32F732xx) || defined (STM32F733xx) || defined (STM32F730xx)
817 uint32_t tickstart = 0;
818 uint32_t tmpreg0 = 0;
819 uint32_t plli2sused = 0;
820 uint32_t pllsaiused = 0;
1100 assert_param(IS_RCC_SDMMC2CLKSOURCE(PeriphClkInit->Sdmmc2ClockSelection));
1103 __HAL_RCC_SDMMC2_CONFIG(PeriphClkInit->Sdmmc2ClockSelection);
1278 uint32_t tempreg = 0;
1290 RCC_PERIPHCLK_CLK48 | RCC_PERIPHCLK_SDMMC2;
1358 PeriphClkInit->Sdmmc2ClockSelection = __HAL_RCC_GET_SDMMC2_SOURCE();
1387 uint32_t tmpreg = 0;
1389 uint32_t frequency = 0;
1391 uint32_t vcoinput = 0;
1393 uint32_t saiclocksource = 0;
1397 saiclocksource =
RCC->DCKCFGR1;
1399 switch (saiclocksource)
1422 frequency = frequency/(tmpreg);
1447 frequency = frequency/(tmpreg);
1455 #if defined (STM32F765xx) || defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) || defined (STM32F779xx)
1480 saiclocksource =
RCC->DCKCFGR1;
1482 switch (saiclocksource)
1505 frequency = frequency/(tmpreg);
1530 frequency = frequency/(tmpreg);
1538 #if defined (STM32F765xx) || defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) || defined (STM32F779xx)
1596 #if defined(RCC_PLLI2SCFGR_PLLI2SP)
1597 assert_param(IS_RCC_PLLI2SP_VALUE(PLLI2SInit->PLLI2SP));
1615 #if defined (STM32F722xx) || defined (STM32F723xx) || defined (STM32F732xx) || defined (STM32F733xx) || defined (STM32F730xx)
1684 #if defined(RCC_PLLSAICFGR_PLLSAIR)
1703 #if defined (STM32F722xx) || defined (STM32F723xx) || defined (STM32F732xx) || defined (STM32F733xx) || defined (STM32F730xx)
1714 PLLSAIInit->
PLLSAIQ, PLLSAIInit->PLLSAIR);
#define __HAL_RCC_I2C1_CONFIG(__I2C1_CLKSOURCE__)
Macro to configure the I2C1 clock (I2C1CLK).
#define IS_RCC_I2C1CLKSOURCE(SOURCE)
#define __HAL_RCC_LPTIM1_CONFIG(__LPTIM1_CLKSOURCE__)
Macro to configure the LPTIM1 clock (LPTIM1CLK).
#define assert_param(expr)
Include module's header file.
#define __HAL_RCC_UART7_CONFIG(__UART7_CLKSOURCE__)
Macro to configure the UART7 clock (UART7CLK).
#define RCC_PLLI2SCFGR_PLLI2SN
#define __HAL_RCC_TIMCLKPRESCALER(__PRESC__)
Macro to configure the Timers clocks prescalers.
#define RCC_PLLI2SCFGR_PLLI2SN_Pos
#define RCC_DCKCFGR1_PLLSAIDIVR
#define RCC_PERIPHCLK_USART6
uint32_t Usart6ClockSelection
#define __HAL_RCC_PLLI2S_PLLSAICLKDIVQ_CONFIG(__PLLI2SDivQ__)
Macro to configure the SAI clock Divider coming from PLLI2S.
HAL_StatusTypeDef
HAL Status structures definition
#define __HAL_RCC_UART5_CONFIG(__UART5_CLKSOURCE__)
Macro to configure the UART5 clock (UART5CLK).
#define RCC_SAI1CLKSOURCE_PLLSAI
#define __HAL_RCC_GET_SDMMC1_SOURCE()
macro to get the SDMMC1 clock source.
#define __HAL_RCC_CEC_CONFIG(__CEC_CLKSOURCE__)
Macro to configure the CEC clock (CECCLK).
#define RCC_PLLSOURCE_HSI
#define __HAL_RCC_PLLSAI_DISABLE()
#define IS_RCC_PLLSAI_DIVQ_VALUE(VALUE)
#define RCC_DCKCFGR1_TIMPRE
#define __HAL_RCC_SAI1_CONFIG(__SOURCE__)
Macro to configure SAI1 clock source selection.
#define IS_RCC_UART7CLKSOURCE(SOURCE)
uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk)
#define __HAL_RCC_GET_I2C4_SOURCE()
macro to get the I2C4 clock source.
#define IS_RCC_PLLSAI_DIVR_VALUE(VALUE)
#define __HAL_RCC_I2C4_CONFIG(__I2C4_CLKSOURCE__)
Macro to configure the I2C4 clock (I2C4CLK).
uint32_t Uart5ClockSelection
#define RCC_PERIPHCLK_SPDIFRX
uint32_t Usart3ClockSelection
#define IS_RCC_USART6CLKSOURCE(SOURCE)
#define IS_RCC_TIMPRES(VALUE)
#define RCC_PERIPHCLK_PLLI2S
#define RCC_PERIPHCLK_DFSDM1
#define IS_RCC_USART3CLKSOURCE(SOURCE)
uint32_t PeriphClockSelection
#define RCC_PERIPHCLK_UART7
uint32_t Sdmmc1ClockSelection
#define __HAL_RCC_PLLSAI_CONFIG(__PLLSAIN__, __PLLSAIP__, __PLLSAIQ__, __PLLSAIR__)
Macro to configure the PLLSAI clock multiplication and division factors.
#define IS_RCC_CECCLKSOURCE(SOURCE)
#define __HAL_RCC_GET_DFSDM1_SOURCE()
Macro to get the DFSDM1 clock source.
#define RCC_PERIPHCLK_I2S
#define __HAL_RCC_I2C2_CONFIG(__I2C2_CLKSOURCE__)
Macro to configure the I2C2 clock (I2C2CLK).
#define RCC_PLLI2SCFGR_PLLI2SQ
uint32_t HAL_GetTick(void)
Provides a tick value in millisecond.
#define __HAL_RCC_GET_USART1_SOURCE()
macro to get the USART1 clock source.
#define RCC_PERIPHCLK_CLK48
uint32_t TIMPresSelection
uint32_t Usart1ClockSelection
#define __HAL_RCC_GET_UART7_SOURCE()
macro to get the UART7 clock source.
RCC_PLLI2SInitTypeDef PLLI2S
#define RCC_DCKCFGR1_SAI1SEL_1
#define IS_RCC_UART4CLKSOURCE(SOURCE)
#define IS_RCC_PLLSAIR_VALUE(VALUE)
#define RCC_PLLSAICFGR_PLLSAIQ_Pos
RCC_PLLSAIInitTypeDef PLLSAI
#define RCC_PLLCFGR_PLLSRC
#define RCC_PLLSAICFGR_PLLSAIP_Pos
#define __HAL_RCC_CLK48_CONFIG(__CLK48_SOURCE__)
Macro to configure the CLK48 source (CLK48CLK).
#define RCC_DCKCFGR1_SAI2SEL_0
#define __HAL_RCC_UART4_CONFIG(__UART4_CLKSOURCE__)
Macro to configure the UART4 clock (UART4CLK).
#define __HAL_RCC_GET_SAI1_SOURCE()
Macro to get the SAI1 clock source.
#define RCC_DCKCFGR1_PLLI2SDIVQ_Pos
HAL_StatusTypeDef HAL_RCCEx_DisablePLLI2S(void)
#define RCC_PLLI2SCFGR_PLLI2SR_Pos
#define __HAL_RCC_GET_I2C2_SOURCE()
Macro to get the I2C2 clock source.
#define __HAL_RCC_GET_USART2_SOURCE()
macro to get the USART2 clock source.
#define RCC_PERIPHCLK_USART3
#define IS_RCC_CLK48SOURCE(SOURCE)
#define __HAL_RCC_GET_SAI2_SOURCE()
Macro to get the SAI2 clock source.
#define __HAL_RCC_PLLI2S_ENABLE()
Macros to enable or disable the PLLI2S.
#define IS_RCC_PLLSAIP_VALUE(VALUE)
#define IS_RCC_UART8CLKSOURCE(SOURCE)
#define RCC_PLLSAICFGR_PLLSAIN_Pos
#define RCC_CLK48SOURCE_PLLSAIP
HAL_StatusTypeDef HAL_RCCEx_DisablePLLSAI(void)
#define HSI_VALUE
Internal High Speed oscillator (HSI) value. This value is used by the RCC HAL module to compute the s...
#define RCC_SAI1CLKSOURCE_PLLI2S
#define RCC_PERIPHCLK_UART5
uint32_t Lptim1ClockSelection
#define RCC_SAI2CLKSOURCE_PLLSAI
#define __HAL_RCC_I2S_CONFIG(__SOURCE__)
Macro to configure the I2S clock source (I2SCLK).
#define __HAL_RCC_GET_CEC_SOURCE()
macro to get the CEC clock source.
uint32_t Sai2ClockSelection
#define __HAL_RCC_PLLSAI_ENABLE()
Macros to Enable or Disable the PLLISAI.
#define IS_RCC_I2C3CLKSOURCE(SOURCE)
#define RCC_TIMPRES_ACTIVATED
#define __HAL_RCC_BACKUPRESET_RELEASE()
uint32_t Dfsdm1ClockSelection
#define IS_RCC_PLLI2SN_VALUE(VALUE)
#define RCC_PERIPHCLK_UART8
#define IS_RCC_LPTIM1CLK(SOURCE)
#define EXTERNAL_CLOCK_VALUE
External clock source for I2S peripheral This value is used by the I2S HAL module to compute the I2S ...
#define IS_RCC_I2SCLKSOURCE(SOURCE)
#define RCC_PERIPHCLK_I2C3
uint32_t I2c1ClockSelection
#define RCC_TIMPRES_DESACTIVATED
#define IS_RCC_PLLI2SR_VALUE(VALUE)
#define __HAL_RCC_USART2_CONFIG(__USART2_CLKSOURCE__)
Macro to configure the USART2 clock (USART2CLK).
#define IS_RCC_I2C2CLKSOURCE(SOURCE)
#define RCC_PERIPHCLK_I2C1
#define __HAL_RCC_GET_I2C1_SOURCE()
Macro to get the I2C1 clock source.
#define __HAL_RCC_GET_UART4_SOURCE()
macro to get the UART4 clock source.
#define IS_RCC_I2C4CLKSOURCE(SOURCE)
#define RCC_DCKCFGR1_PLLSAIDIVQ_Pos
#define RCC_PERIPHCLK_SAI2
#define RCC_PERIPHCLK_UART4
#define READ_BIT(REG, BIT)
#define RCC_PERIPHCLK_I2C4
PLLI2S Clock structure definition.
#define RCC_PERIPHCLK_USART1
#define RCC_PLLI2SCFGR_PLLI2SQ_Pos
#define __HAL_RCC_GET_I2SCLKSOURCE()
Macro to Get I2S clock source selection.
#define __HAL_RCC_I2C3_CONFIG(__I2C3_CLKSOURCE__)
Macro to configure the I2C3 clock (I2C3CLK).
#define RCC_DCKCFGR1_PLLSAIDIVR_Pos
#define RCC_DCKCFGR1_SAI1SEL_0
uint32_t CecClockSelection
#define RCC_LSE_TIMEOUT_VALUE
uint32_t I2c3ClockSelection
uint32_t Clk48ClockSelection
#define __HAL_RCC_PLLSAI_PLLSAICLKDIVQ_CONFIG(__PLLSAIDivQ__)
Macro to configure the SAI clock Divider coming from PLLSAI.
#define IS_RCC_PLLSAIQ_VALUE(VALUE)
#define __HAL_RCC_GET_I2C3_SOURCE()
macro to get the I2C3 clock source.
#define RCC_PERIPHCLK_USART2
#define RCC_PLLI2SCFGR_PLLI2SP
#define __HAL_RCC_PWR_CLK_ENABLE()
#define RCC_PERIPHCLK_CEC
#define IS_RCC_USART2CLKSOURCE(SOURCE)
uint32_t Uart7ClockSelection
#define IS_RCC_PLLI2S_DIVQ_VALUE(VALUE)
uint32_t I2c4ClockSelection
PLLSAI Clock structure definition.
#define __HAL_RCC_GET_USART3_SOURCE()
macro to get the USART3 clock source.
#define RCC_PERIPHCLK_SAI1
#define RCC_PLLSAICFGR_PLLSAIR_Pos
#define IS_RCC_PLLI2SQ_VALUE(VALUE)
#define RCC_PLLI2SCFGR_PLLI2SP_Pos
#define __HAL_RCC_USART6_CONFIG(__USART6_CLKSOURCE__)
Macro to configure the USART6 clock (USART6CLK).
#define RCC_PLLSAICFGR_PLLSAIP
#define RCC_DCKCFGR1_SAI2SEL_1
#define RCC_PLLI2SCFGR_PLLI2SR
#define __HAL_RCC_USART1_CONFIG(__USART1_CLKSOURCE__)
Macro to configure the USART1 clock (USART1CLK).
#define RCC_PLLSAICFGR_PLLSAIN
HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit)
#define __HAL_RCC_GET_FLAG(__FLAG__)
#define RCC_DCKCFGR1_SAI2SEL
#define RCC_PERIPHCLK_TIM
#define RCC_FLAG_PLLI2SRDY
#define __HAL_RCC_GET_CLK48_SOURCE()
macro to get the CLK48 source.
uint32_t Sai1ClockSelection
uint32_t Uart8ClockSelection
#define IS_RCC_UART5CLKSOURCE(SOURCE)
#define __HAL_RCC_GET_UART5_SOURCE()
macro to get the UART5 clock source.
#define RCC_I2SCLKSOURCE_PLLI2S
#define __HAL_RCC_GET_USART6_SOURCE()
macro to get the USART6 clock source.
#define RCC_DCKCFGR1_PLLSAIDIVQ
#define RCC_PLLSAICFGR_PLLSAIQ
#define IS_RCC_PLLSAIN_VALUE(VALUE)
#define __HAL_RCC_USART3_CONFIG(__USART3_CLKSOURCE__)
Macro to configure the USART3 clock (USART3CLK).
#define RCC_DCKCFGR1_SAI1SEL
#define RCC_DBP_TIMEOUT_VALUE
#define __HAL_RCC_BACKUPRESET_FORCE()
Macros to force or release the Backup domain reset.
uint32_t Usart2ClockSelection
#define __HAL_RCC_PLLI2S_CONFIG(__PLLI2SN__, __PLLI2SR__)
Macro to configure the PLLI2S clock multiplication and division factors .
#define RCC_PERIPHCLK_LPTIM1
#define RCC_PERIPHCLK_RTC
#define HSE_VALUE
Adjust the value of External High Speed oscillator (HSE) used in your application....
HAL_StatusTypeDef HAL_RCCEx_EnablePLLI2S(RCC_PLLI2SInitTypeDef *PLLI2SInit)
#define RCC_PERIPHCLK_I2C2
#define __HAL_RCC_GET_UART8_SOURCE()
macro to get the UART8 clock source.
#define PLLI2S_TIMEOUT_VALUE
#define __HAL_RCC_SDMMC1_CONFIG(__SDMMC1_CLKSOURCE__)
Macro to configure the SDMMC1 clock (SDMMC1CLK).
#define HAL_IS_BIT_SET(REG, BIT)
#define RCC_SAI2CLKSOURCE_PLLI2S
uint32_t I2sClockSelection
RCC extended clocks structure definition.
#define __HAL_RCC_UART8_CONFIG(__UART8_CLKSOURCE__)
Macro to configure the UART8 clock (UART8CLK).
#define IS_RCC_RTCCLKSOURCE(__SOURCE__)
#define __HAL_RCC_GET_LPTIM1_SOURCE()
macro to get the LPTIM1 clock source.
#define __HAL_RCC_PLLI2S_DISABLE()
#define __HAL_RCC_RTC_CONFIG(__RTCCLKSource__)
#define __HAL_RCC_SAI2_CONFIG(__SOURCE__)
Macro to configure SAI2 clock source selection.
uint32_t I2c2ClockSelection
uint32_t Uart4ClockSelection
#define IS_RCC_USART1CLKSOURCE(SOURCE)
#define __HAL_RCC_PLLSAI_GET_FLAG()
Check PLLSAI RDY flag is set or not.
#define __HAL_RCC_DFSDM1_CONFIG(__DFSDM1CLKSource__)
Macro to configure the DFSDM1 clock.
#define IS_RCC_SDMMC1CLKSOURCE(SOURCE)
#define PLLSAI_TIMEOUT_VALUE
#define IS_RCC_DFSDM1CLKSOURCE(SOURCE)
#define RCC_DCKCFGR1_PLLI2SDIVQ
HAL_StatusTypeDef HAL_RCCEx_EnablePLLSAI(RCC_PLLSAIInitTypeDef *PLLSAIInit)
This file contains all the functions prototypes for the HAL module driver.
void HAL_RCCEx_GetPeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit)
#define RCC_PLLSAICFGR_PLLSAIR
uint32_t RTCClockSelection
#define RCC_PERIPHCLK_SDMMC1