STM32F439xx HAL User Manual
Defines
Get Clock source
RCC Exported Macros

Defines

#define __HAL_RCC_SYSCLK_CONFIG(__RCC_SYSCLKSOURCE__)   MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, (__RCC_SYSCLKSOURCE__))
 Macro to configure the system clock source.
#define __HAL_RCC_GET_SYSCLK_SOURCE()   (RCC->CFGR & RCC_CFGR_SWS)
 Macro to get the clock source used as system clock.
#define __HAL_RCC_GET_PLL_OSCSOURCE()   ((uint32_t)(RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC))
 Macro to get the oscillator used as PLL clock source.

Define Documentation

#define __HAL_RCC_GET_PLL_OSCSOURCE ( )    ((uint32_t)(RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC))

Macro to get the oscillator used as PLL clock source.

Return values:
Theoscillator used as PLL clock source. The returned value can be one of the following:
  • RCC_PLLSOURCE_HSI: HSI oscillator is used as PLL clock source.
  • RCC_PLLSOURCE_HSE: HSE oscillator is used as PLL clock source.

Definition at line 1112 of file stm32f4xx_hal_rcc.h.

Referenced by HAL_RCC_GetSysClockFreq().

#define __HAL_RCC_GET_SYSCLK_SOURCE ( )    (RCC->CFGR & RCC_CFGR_SWS)

Macro to get the clock source used as system clock.

Return values:
Theclock source used as system clock. The returned value can be one of the following:
  • RCC_SYSCLKSOURCE_STATUS_HSI: HSI used as system clock.
  • RCC_SYSCLKSOURCE_STATUS_HSE: HSE used as system clock.
  • RCC_SYSCLKSOURCE_STATUS_PLLCLK: PLL used as system clock.
  • RCC_SYSCLKSOURCE_STATUS_PLLRCLK: PLLR used as system clock. This parameter is available only for STM32F446xx devices.

Definition at line 1104 of file stm32f4xx_hal_rcc.h.

Referenced by HAL_PWREx_ControlVoltageScaling(), HAL_RCC_ClockConfig(), and HAL_RCC_OscConfig().

#define __HAL_RCC_SYSCLK_CONFIG (   __RCC_SYSCLKSOURCE__)    MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, (__RCC_SYSCLKSOURCE__))

Macro to configure the system clock source.

Parameters:
__RCC_SYSCLKSOURCE__specifies the system clock source. This parameter can be one of the following values:
  • RCC_SYSCLKSOURCE_HSI: HSI oscillator is used as system clock source.
  • RCC_SYSCLKSOURCE_HSE: HSE oscillator is used as system clock source.
  • RCC_SYSCLKSOURCE_PLLCLK: PLL output is used as system clock source.
  • RCC_SYSCLKSOURCE_PLLRCLK: PLLR output is used as system clock source. This parameter is available only for STM32F446xx devices.

Definition at line 1093 of file stm32f4xx_hal_rcc.h.

Referenced by HAL_RCC_ClockConfig().