HAL RCC Generic Driver
HAL_RCC_MCOConfig
Function name
Function description
Parameters
Return values
Notes
HAL_RCC_EnableCSS
Function name
Function description
Return values
Notes
422/1371
void HAL_RCC_MCOConfig (uint32_t RCC_MCOx, uint32_t
RCC_MCOSource, uint32_t RCC_MCODiv)
Selects the clock source to output on MCO1 pin(PA8) or on MCO2
pin(PC9).
RCC_MCOx: specifies the output direction for the clock
source. This parameter can be one of the following values:
RCC_MCO1: Clock source to output on MCO1 pin(PA8).
RCC_MCO2: Clock source to output on MCO2 pin(PC9).
RCC_MCOSource: specifies the clock source to output. This
parameter can be one of the following values:
RCC_MCO1SOURCE_HSI: HSI clock selected as
MCO1 source
RCC_MCO1SOURCE_LSE: LSE clock selected as
MCO1 source
RCC_MCO1SOURCE_HSE: HSE clock selected as
MCO1 source
RCC_MCO1SOURCE_PLLCLK: main PLL clock
selected as MCO1 source
RCC_MCO2SOURCE_SYSCLK: System clock
(SYSCLK) selected as MCO2 source
RCC_MCO2SOURCE_PLLI2SCLK: PLLI2S clock
selected as MCO2 source
RCC_MCO2SOURCE_HSE: HSE clock selected as
MCO2 source
RCC_MCO2SOURCE_PLLCLK: main PLL clock
selected as MCO2 source
RCC_MCODiv: specifies the MCOx prescaler. This
parameter can be one of the following values:
RCC_MCODIV_1: no division applied to MCOx clock
RCC_MCODIV_2: division by 2 applied to MCOx clock
RCC_MCODIV_3: division by 3 applied to MCOx clock
RCC_MCODIV_4: division by 4 applied to MCOx clock
RCC_MCODIV_5: division by 5 applied to MCOx clock
None:
PA8/PC9 should be configured in alternate function mode.
void HAL_RCC_EnableCSS (void )
Enables the Clock Security System.
None:
If a failure is detected on the HSE oscillator clock, this
oscillator is automatically disabled and an interrupt is
generated to inform the software about the failure (Clock
Security System Interrupt, CSSI), allowing the MCU to
perform rescue operations. The CSSI is linked to the Cortex-
M3 NMI (Non-Maskable Interrupt) exception vector.
DocID028236 Rev 2
UM1940
Need help?
Do you have a question about the STM32F2 and is the answer not in the manual?
Questions and answers