SPRUIV7B May 2022 – September 2023 AM620-Q1 , AM623 , AM625 , AM625-Q1 , AM625SIP
Each interrupt has a priority number assigned to it (set using the 4.1.20 Interrupt Q Priority Register (Base Address + 0x1000 + Q*0x4) register). Legal values are 0 to 15 where 0 is the highest priority and 15 is the lowest priority. The highest priority interrupt is the pending interrupt with the smallest priority number. If two pending interrupts have the same priority, the interrupt lowest numerically (0 through maximum number of interrupts) is prioritized. IRQs and FIQs are prioritized separately.
The VIM supports the interrupt of the currently active interrupt by one with a higher priority. FIQs and IRQs are completely separate, but both use the same mechanism. When an interrupt goes from pending to active (FIQ: reading the FIQ Vector Address (Base Address + 0x1C), IRQ: reading the IRQ Vector Address (Base Address + 0x18) or the coreN_IRQACK going high), then the interrupt is loaded into the corresponding Active Register, and all interrupts of an equal or lesser priority are masked off (see note below). If, before this interrupt is cleared (writing the FIQ Vector Address (Base Address + 0x1C) or IRQ Vector Address (Base Address + 0x18)) another interrupt of higher priority arrives, then the FIQn/IRQn will be asserted and that interrupt made pending as normal. The CPU may or may not service the higher priority interrupt. If the CPU switches this interrupt to active, by reading the corresponding Vector Address Register (or coreN_IRQACK going high for an IRQ) , then the currently active interrupt will be pushed on to a stack. When an interrupt is cleared by writing the Vector Address Register, if there are any interrupts on the stack, the first entry is popped off and put back into the Active Register, so that software may continue where it left off. Note that the IRQVEC/FIQVEC address registers are not repopulated with the old vector as it’s assumed that the ISR is picking back up where it left off. Only the interrupt number and priority are restored to the ACTIRQ/ACTFIQ registers. If software needs the vector again, it will have to read it by using the interrupt number.