specifies the output direction for the clock source. This parameter can be one of the following values: @arg RCC_MCO1: Clock source to output on MCO1 pin(PA8). @arg 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: @arg RCC_MCO1SOURCE_HSI: HSI clock selected as MCO1 source @arg RCC_MCO1SOURCE_LSE: LSE clock selected as MCO1 source @arg RCC_MCO1SOURCE_HSE: HSE clock selected as MCO1 source @arg RCC_MCO1SOURCE_PLLCLK: main PLL clock selected as MCO1 source @arg RCC_MCO2SOURCE_SYSCLK: System clock (SYSCLK) selected as MCO2 source @arg RCC_MCO2SOURCE_PLLI2SCLK: PLLI2S clock selected as MCO2 source, available for all STM32F4 devices except STM32F410xx @arg RCC_MCO2SOURCE_I2SCLK: I2SCLK clock selected as MCO2 source, available only for STM32F410Rx devices @arg RCC_MCO2SOURCE_HSE: HSE clock selected as MCO2 source @arg 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: @arg RCC_MCODIV_1: no division applied to MCOx clock @arg RCC_MCODIV_2: division by 2 applied to MCOx clock @arg RCC_MCODIV_3: division by 3 applied to MCOx clock @arg RCC_MCODIV_4: division by 4 applied to MCOx clock @arg RCC_MCODIV_5: division by 5 applied to MCOx clock
Return value
None
Notes
PA8/PC9 should be configured in alternate function mode. For STM32F410Rx devices to output I2SCLK clock on MCO2 you should have at last one of the SPI clocks enabled (SPI1, SPI2 or SPI5).
Examples
HAL_RCC_MCOConfig() is referenced by 30 libraries and example projects: