Interrupt upon edge (or level) of input signal on an external pin is a feature traditionally present in perhaps all microcontrollers. Usually, the number of pins, which can be used as external interrupt, is limited and much less than all pins present on the given package.
In all STM32, there are 16 edge-triggered external pin interrupts, which are handled by the EXTI unit1. Interrupt upon rising, falling, or both edges can be selected individually, and the edge detection is asynchronous, i.e. independent on the system clock. The EXTI functionality on a selected pin is available in parallel to any other functionality of given pin, except if it's set as Analog.
External pin interrupts EXTI0..EXTI15 in STM32 are not assigned to fixed pins - there is a certain, although not unlimited, flexibility available: each EXTIn interrupt can be assigned to any of the pin with the same pin number within the port. For example, EXTI3 can be assigned to PA3, or PB3, or PC3 etc.
This means, that there must be some mechanism to select particular pin for given EXTIn interrupt. In most STM32, this selection is through the SYSCFG unit, in bitfields of SYSCFG_EXTICRx registers. However, there are exceptions:
- in the ancient 'F1 family, there's no SYSCFG and for EXTI selection AFIO_EXTICRx registers were used;
- in the 'G0/'C0, 'L5 and 'U5 families, selection has been (quite logically) moved into EXTI itself, using EXTI_EXTICRx registers