External Interrupt (EXTI)
External interrupt is an additional feature of GPIOs in input mode. It makes a micro to respond
instantly to changes done on it GPIO input pin(s) by an external events/triggers, skipping other tasks.
External interrupts are useful in many scenarios. For instance, an emergency button. Consider the case
of a treadmill. You are running at a speed and suddenly you get an ache in one of your ankles. You'll
surely want to stop running immediately. Rather decreasing speed in small steps, you can hit the
emergency button to quickly stop the treadmill. The emergency button will interrupt all other
processes and immediately instruct the treadmill's CPU to decrease speed faster than otherwise
possible. Thus, it has high priority over other processes.
In most 8-bit micros, there are few external interrupt pins and very limited options are available for
them but that's not the case with STM's micros. In STM8s, almost all GPIO pins have independent
external interrupt capability with input Schmitt triggers. Additionally, there's interrupt controller to
set interrupt priority.
Need help?
Do you have a question about the STM8 and is the answer not in the manual?
Questions and answers