
128
XMEGA A [MANUAL]
8077I–AVR–11/2012
Table 12-1. Interrupt levels.
The interrupt level of an interrupt request is compared against the current level and status of the interrupt controller. An
interrupt request of a higher level will interrupt any ongoing interrupt handler from a lower level interrupt. When returning
from the higher level interrupt handler, the execution of the lower level interrupt handler will continue.
12.6
Interrupt Priority
Within each interrupt level, all interrupts have a priority. When several interrupt requests are pending, the order in which
interrupts are acknowledged is decided both by the level and the priority of the interrupt request. Interrupts can be
organized in a static or dynamic (round-robin) priority scheme. High- and medium-level interrupts and the NMI will always
have static priority. For low-level interrupts, static or dynamic priority scheduling can be selected.
12.6.1 Static Priority
Interrupt vectors (IVEC) are located at fixed addresses. For static priority, the interrupt vector address decides the priority
within one interrupt level, where the lowest interrupt vector address has the highest priority. Refer to the device datasheet
for the interrupt vector table with the base address for all modules and peripherals with interrupt capability. Refer to the
interrupt vector summary of each module and peripheral in this manual for a list of interrupts and their corresponding
offset address within the different modules and peripherals.
Figure 12-3. Static priority.
12.6.2 Round-robin Scheduling
To avoid the possible starvation problem for low-level interrupts with static priority, where some interrupts might never be
served, the PMIC offers round-robin scheduling for low-level interrupts. When round-robin scheduling is enabled, the
Interrupt Level Configuration
Group configuration
Description
00
OFF
Interrupt disabled.
01
LO
Low-level interrupt
10
MED
Medium-level interrupt
11
HI
High-level interrupt
IVEC 0
:
IVEC x
IVEC x+1
:
IVEC N
Lowes t Priority
Highes t Priority
Lowes t Addres s
Highes t Addres s