How to configure and use GPIOs to toggle the on-board user LEDs every 250 ms.
This example is based on the STM32C0xx LL API. The peripheral is initialized with LL initialization function to demonstrate LL init usage.
PB.6 IO (configured in output pushpull mode) toggles in a forever loop. On STM32C0116-DISCO board this IO is connected to LED3.
In this example, HCLK is configured at 48 MHz.
System, GPIO, Output, No pull, Speed, Push-pull, Toggle
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.
In order to make the program work, you must do the following :