EXTI_ToggleLedOnIT_Init Example Description

This example describes how to configure the EXTI and use GPIOs to toggle the user LEDs available on the board when a Joystick Selection push-button is pressed. This example is based on the STM32C0xx LL API. Peripheral initialization is done using LL initialization function to demonstrate LL init usage.

In this example, one EXTI line (EXTI_Line4) is configured to generate an interrupt on each rising edge.

In the interrupt routine a led connected to a specific GPIO pin is toggled.

In this example:

On STM32C0316-DISCO:

Keywords

System, GPIO, Output, Alternate function, EXTI, Toggle

Directory contents

Hardware and Software environment

How to use it ?

In order to make the program work, you must do the following :