STM32 External Interrupts.
The advantage of external interrupts is that they detect a transition from one logic level to another, not the level itself. Suppose we need to detect when the voltage on some pin changes and urgently execute a certain set of instructions. The simplest algorithm looks like this: at certain intervals we poll the pin and check whether its state has changed...