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.
PA.05 IO (configured in output pushpull mode) toggles in a forever loop. On NUCLEO-C031C6 board this IO is connected to LED4.
In this example, HCLK is configured at 48 MHz.
System, GPIO, Output, No pull, Speed, Push-pull, Toggle
This example runs on STM32C031C6Tx devices.
This example has been tested with NUCLEO-C031C6 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 :