HAL + 0/4 examples
CodeScope will show references to __HAL_RCC_HSE_CONFIG from the following samples and libraries:
Examples
STM324x9I_EVAL
Applications
USB_Device
STM324xG_EVAL
Applications
USB_Device
STM32F413ZH-Nucleo
Applications
USB_Device
STM32F429ZI-Nucleo
Applications
USB_Device
 
Symbols
loading...
Files
loading...

__HAL_RCC_HSE_CONFIG macro

Macro to configure the External High Speed oscillator (HSE).

Syntax

#define __HAL_RCC_HSE_CONFIG(__STATE__) \     do { \     if ((__STATE__) == RCC_HSE_ON) \     { \     SET_BIT(RCC->CR, RCC_CR_HSEON); \     } \     else if ((__STATE__) == RCC_HSE_BYPASS) \     { \     SET_BIT(RCC->CR, RCC_CR_HSEBYP); \     SET_BIT(RCC->CR, RCC_CR_HSEON); \     } \     else \     { \     CLEAR_BIT(RCC->CR, RCC_CR_HSEON); \     CLEAR_BIT(RCC->CR, RCC_CR_HSEBYP); \     } \     } while(0U)

Arguments

__STATE__

specifies the new state of the HSE. This parameter can be one of the following values: @arg RCC_HSE_OFF: turn OFF the HSE oscillator, HSERDY flag goes low after 6 HSE oscillator clock cycles. @arg RCC_HSE_ON: turn ON the HSE oscillator. @arg RCC_HSE_BYPASS: HSE oscillator bypassed with external clock.

Notes

Transition HSE Bypass to HSE On and HSE On to HSE Bypass are not supported by this macro. User should request a transition to HSE Off first and then HSE On or HSE Bypass. After enabling the HSE (RCC_HSE_ON or RCC_HSE_Bypass), the application software should wait on HSERDY flag to be set indicating that HSE clock is stable and can be used to clock the PLL and/or system clock. HSE state can not be changed if it is used directly or through the PLL as system clock. In this case, you have to select another source of the system clock then change the HSE state (ex. disable it). The HSE is stopped by hardware when entering STOP and STANDBY modes. This function reset the CSSON bit, so if the clock security system(CSS) was previously enabled you have to enable it again after calling this function.

Examples

__HAL_RCC_HSE_CONFIG is referenced by 4 libraries and example projects.

References

LocationText
stm32f4xx_hal_rcc.h:890
#define __HAL_RCC_HSE_CONFIG(__STATE__) \
stm32f4xx_hal_rcc.c:248
__HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);
stm32f4xx_hal_rcc_ex.c:3392
__HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState);