When an IRQ interrupt is received, the CPU should follow these steps if not using the vector interface:
- Read the R5FSS_VIM_IRQVEC register and jump to
that address to service the ISR
- Reading this register
will mask (discard) all interrupts of an equal or lower priority and
de-assert the coreN_IRQn output. If another interrupt of a higher
priority becomes available, the coreN_IRQn will re-assert,
allowing priority interruption of an interrupt
- Reading this register
will cause the value from the R5FSS_VIM_PRIIRQ[9:0] NUM bit field to be
loaded into the R5FSS_VIM_ACTIRQ[9:0] NUM bit field, and the
R5FSS_VIM_ACTIRQ[31] VALID bit to be set
- Service the interrupt
- Depending on whether the original source of the interrupt was a pulse or a level
- Pulse
- Clear the status by writing a '1' to the
appropriate bit in the R5FSS_VIM_STS_j register, or
R5FSS_VIM_IRQSTS_j register
- Clear the interrupt at the source
- Level
- Clear the interrupt at the source
- Clear the status by writing a '1' to the
appropriate bit in the R5FSS_VIM_STS_j register, or
R5FSS_VIM_IRQSTS_j register
- Write any value to the R5FSS_VIM_IRQVEC register
- This will clear the
priority mask and will cause all interrupts to be re-evaluated for the
new highest priority interrupt
- This will also clear the
R5FSS_VIM_ACTIRQ[31] VALID bit