8.2 Interrupt Vector Mapping
Each of the interrupt vectors is connected to one peripheral instance, as shown in the table below. A peripheral can have one or more interrupt sources, see the Interrupt section in the Functional description of the respective peripheral for more details on the available interrupt sources.
When the interrupt condition occurs, an Interrupt Flag (nameIF) is set in the Interrupt Flags register of the peripheral (peripheral.INTFLAGS).
An interrupt is enabled or disabled by writing to the corresponding Interrupt Enable bit (nameIE) in the peripheral's Interrupt Control register (peripheral.INTCTRL).
The naming of the registers may vary slightly in some peripherals.
An interrupt request is generated when the corresponding interrupt is enabled and the interrupt flag is set. The interrupt request remains active until the interrupt flag is cleared. See the peripheral's INTFLAGS register for details on how to clear interrupt flags.
Interrupts must be enabled globally for interrupt requests to be generated.
Vector Number | Base Address | Peripheral Source |
---|---|---|
0 | 0x00 | RESET |
1 | 0x02 | NMI - Non-Maskable Interrupt from CRC |
2 | 0x04 | VLM - Voltage Level Monitor |
3 | 0x06 | PORTA - Port A |
4 | 0x08 | PORTB - Port B |
5 | 0x0A | PORTC - Port C |
6 | 0x0C | RTC - Real-Time Counter |
7 | 0x0E | PIT - Periodic Interrupt Timer (in RTC peripheral) |
8 | 0x10 | TCA0 - Timer Counter Type A |
13 | 0x1A | TCB0 - Timer Counter Type B |
14 | 0x1C | TCB1 - Timer Counter Type B |
15 | 0x1E | TCD0 - Timer Counter Type D |
17 | 0x22 | AC0 – Analog Comparator |
18 | 0x24 | AC1 – Analog Comparator |
19 | 0x26 | AC2 – Analog Comparator |
20 | 0x28 | ADC0 – Analog-to-Digital Converter/PTC |
22 | 0x2C | ADC1 – Analog-to-Digital Converter |
24 | 0x30 | TWI0 - Two-Wire Interface/I2C |
26 | 0x34 | SPI0 - Serial Peripheral Interface |
27 | 0x36 | USART0 - Universal Asynchronous Receiver-Transmitter |
30 | 0x3C | NVM - Nonvolatile Memory |