Field Guide · concept

An interrupt is a hardware signal that pauses a processor’s normal program flow to run a short handler in response to an event, then resumes where it left off.1

Overview

When a peripheral needs attention — a timer expires, a byte arrives on a UART, a GPIO pin changes — it raises an interrupt. The processor jumps to the matching interrupt service routine (ISR) via a vector table, runs it, and returns. On ARM Cortex-M parts a nested vectored interrupt controller (NVIC) prioritizes and arbitrates these requests with deterministic latency. The alternative, polling, wastes cycles repeatedly checking; interrupts let a microcontroller sleep until something actually happens.

Where it fits

Interrupts are the foundation of responsive, low-power embedded code: an MCU can idle in a low-power mode and wake only on an event, which is how battery devices run for years. ISRs are kept short, often just setting a flag for the main loop. In bare-metal firmware interrupts plus a main loop are the whole architecture; an RTOS builds its scheduler on top of them.

Sources

  1. Interrupt — Wikipedia, on interrupts and service routines. 

See also