mikroSDK Reference Manual

Macros

#define __HAL_RCC_HSE_PREDIV_CONFIG(__HSE_PREDIV_VALUE__)    MODIFY_REG(RCC->CFGR,RCC_CFGR_PLLXTPRE, (uint32_t)(__HSE_PREDIV_VALUE__))
 Macro to configure the External High Speed oscillator (HSE) Predivision factor for PLL.
 
#define __HAL_RCC_HSE_GET_PREDIV()   READ_BIT(RCC->CFGR, RCC_CFGR_PLLXTPRE)
 Macro to get prediv1 factor for PLL.
 

Macro Definition Documentation

◆ __HAL_RCC_HSE_PREDIV_CONFIG

#define __HAL_RCC_HSE_PREDIV_CONFIG ( __HSE_PREDIV_VALUE__)     MODIFY_REG(RCC->CFGR,RCC_CFGR_PLLXTPRE, (uint32_t)(__HSE_PREDIV_VALUE__))
Note
Predivision factor can not be changed if PLL is used as system clock In this case, you have to select another source of the system clock, disable the PLL and then change the HSE predivision factor.
Parameters
__HSE_PREDIV_VALUE__specifies the division value applied to HSE. This parameter must be a number between RCC_HSE_PREDIV_DIV1 and RCC_HSE_PREDIV_DIV2.