14.3.1 Initialization
Initialize an interrupt in the following order:
- Optional: Configure the expected location of the interrupt vectors using the IVSEL bit in the Control A (CPUINT.CTRLA) register.
- Optional: Enable compact vector table by
writing ‘
1
’ to the CVT bit in the Control A (CPUINT.CTRLA) register. - Optional: Enable vector prioritizing by round robin by writing a ‘1’ to the Round Robin Priority Enable (LVL0RR) bit in CPUINT.CTRLA.
- Optional: Select the Priority Level 1 vector by writing the interrupt vector number to the Interrupt Vector with Priority Level 1 (CPUINT.LVL1VEC) register.
- Optional: Modify the priority of the LVL0 interrupts by configuring Interrupt Priority Level 0 (LVL0PRI) register.
- Configure the interrupt conditions within each peripheral and enable the peripheral’s interrupt.
- Enable interrupts globally by writing a
‘
1
’ to the Global Interrupt Enable (I) bit in the CPU Status (CPU.SREG) register.