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

main program resumes interrupt raised vector → jump ISR — handler short: set a flag return the CPU can sleep until an event wakes it — no wasteful polling
Instead of polling, the processor runs the main program until a peripheral raises an interrupt — a timer, a UART byte, a GPIO change. It jumps through the vector table to the matching service routine, runs it, and returns to where it left off. Between events the CPU can idle in low power, which is how battery devices last for years.

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