Configuration of MCO pin (PA8) to output the system clock.
At start-up, PB7 and MCO pin are configured. The program configures SYSCLK to the max frequency using HSI48 as clock source.
The signal on PA8 (pin 15 of CN5 connector) can be monitored with an oscilloscope to check the different MCO configuration set at each high level connection on PB7 (pin 4 CN5).
Different configuration will be observed :
When user press User push-button, a LED3 toggle is done to indicate a change in MCO config.
System, RCC, PLL, HSI, PLLCLK, SYSCLK, HSE, Clock, Oscillator
This example runs on STM32C011F6Ux devices.
This example has been tested with STM32C0116-DISCO board and can be easily tailored to any other supported device and development board.
STM32C0116-DISCO Set-up
In order to make the program work, you must do the following :