STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
Collaboration diagram for Get Clock source:

Macros

#define __HAL_RCC_SYSCLK_CONFIG(__RCC_SYSCLKSOURCE__)
 Macro to configure the system clock source.
 
#define __HAL_RCC_GET_SYSCLK_SOURCE()
 Macro to get the clock source used as system clock.
 
#define __HAL_RCC_GET_PLL_OSCSOURCE()
 Macro to get the oscillator used as PLL clock source.
 

Detailed Description

Macro Definition Documentation

◆ __HAL_RCC_SYSCLK_CONFIG

#define __HAL_RCC_SYSCLK_CONFIG ( __RCC_SYSCLKSOURCE__)

#include <stm32f4xx_hal_rcc.h>

Value:
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 1070 of file stm32f4xx_hal_rcc.h.

Referenced by HAL_RCC_ClockConfig().

◆ __HAL_RCC_GET_SYSCLK_SOURCE

#define __HAL_RCC_GET_SYSCLK_SOURCE ( )

#include <stm32f4xx_hal_rcc.h>

Value:
(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 1081 of file stm32f4xx_hal_rcc.h.

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

◆ __HAL_RCC_GET_PLL_OSCSOURCE

#define __HAL_RCC_GET_PLL_OSCSOURCE ( )

#include <stm32f4xx_hal_rcc.h>

Value:
((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 1089 of file stm32f4xx_hal_rcc.h.

Referenced by HAL_RCC_GetSysClockFreq().