These handle system-level errors or events.
| Interrupt | Vector Address | | --- | --- | | Timer 0 overflow | 0x1000 | | External interrupt 0 | 0x1004 | | Serial receive interrupt | 0x1008 | | Timer 1 overflow | 0x100C |
Hardware-level signals from peripherals (like a timer expiring or data arriving on a serial port). How It Works: The "Phone Book" Analogy what is vector table in microcontroller
In the simplest terms, a Vector Table is a specific section of memory (usually at the very beginning of the code memory) that contains a list of addresses. Think of it as an or a lookup table for the processor.
Each entry in this table is called a . Each vector points to the memory address of a specific function, known as an Interrupt Service Routine (ISR) or a handler. These handle system-level errors or events
In computer science, a "vector" often refers to a direction or a pointer. In the context of microcontrollers, the vector points the CPU toward the memory location it needs to go to next. It acts as a bridge between the hardware event and the software function designed to handle it.
Most MCUs allow you to "relocate" the vector table. This is essential for Bootloaders , where you might want the MCU to jump to a different set of instructions during a firmware update. Where is it located? Think of it as an or a lookup table for the processor
At its core, a is an array of addresses stored in a specific section of the microcontroller's memory (usually at the very beginning of the Flash memory).
In many modern architectures like ARM Cortex-M, the very first entry in the table isn’t code, but the starting address for the . This ensures the CPU can handle function calls and local variables immediately upon boot-up. 3. System Exceptions These are "internal" interrupts. Examples include: