Having to proactively read the value of the pin by constantly polling the IDR is not convenient in many cases, where the application is supposed to react to state changes. Microcontrollers usually provide mechanisms to connect digital input pins to interrupt lines, so that the application can react in real time to events related to the input because the execution is interrupted to execute the associated service routine.
On the reference MCU, the pin A0 can be connected to the external interrupt and event controller, also known as EXTI. EXTI offers a number of edge-detection triggers that can be attached to interrupt lines. The number of the pin within the GPIO group determines the number of the EXTI interrupt that is ...