If a user does not want to use the
R5FSS_VIM_IRQVEC register, the VIM may be used as a more traditional interrupt
controller. Note that in this mode, priority masking will not work if route 1b is
used (see below) as the hardware prioritization may not match the software
prioritization scheme. In this case, software would be responsible for doing all
priority operations.
- Determine which interrupt to service
- Read the R5FSS_VIM_PRIIRQ register to determine
which interrupt is the highest priority IRQ currently asserted, OR
- Optionally read the R5FSS_VIM_IRQGSTS register to
determine which groups have IRQs pending, then read the
R5FSS_VIM_IRQSTS_j register and use a software prioritization scheme to
determine which IRQ to service
- Service the interrupt
- Read the R5FSS_VIM_IRQVEC register
- Note that this step can
be done any time before step 4
- Value is ignored
- 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