This tutorial demonstrates how to configure interrupts on the STM32L432KC. The example shows how to configure the EXTI controller to trigger an interrupt on the falling edge of a GPIO pin. This GPIO pin is connected to a pullup resistor, thus, pressing it will ground the pin, generate a falling edge, and trigger the interrupt.
The steps to configure the interrupt are as follows:
EXTImux in theSYSCFGperipheral- Configure interrupt generation settings in EXTI peripheral
- Globally enable interrupts
- Set Interrupt Mask Register (
IMR) - Select rising/falling edge trigger
- Turn on the interrupt in the
NVIC_ISER(NB: The bits in the NVIC registers correspond to the interrupt position in the vector table).