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