MPU Interrupt Handlers
6-16
6.4.2
MPU Level 2 Interrupt Handler
Because the number of interrupts that the OMAP5910 device must manage
is greater than 32, a second interrupt handler is used. The resulting interrupt
is connected to the IRQ_0 of the TI925T RISC processor interrupt handler,
which must be programmed as a level interrupt. The added (L2) interrupt
handler is similar to the level 1 interrupt handler.
The result of connecting the two interrupt handlers in a cascade manner is to
increase the total number of input interrupts from 32 to 62.
The simplified sequence for the MPU to receive an input interrupt is as follows:
Step 1: Read the SIR_IRQ_CODE register of the level 1 MPU interrupt
handler.
Step 2: If the interrupt is caused by the level 2 interrupt handler (as indicated
by an IRQ of 0), read the SIR_IRQ_CODE register of the level 2
interrupt handler.
Step 3: If the interrupt is a level interrupt, the corresponding interrupt routine
must first clear the interrupt source (usually by writing to a register
in the module generating the interrupt) or at least mask the interrupt.
Then it must write 1 into the NEW_IRQ_AGR field of the level 2 inter-
rupt handler CONTROL_REG. Then, the ITR register of the level 1
interrupt handler must be cleared. Finally, 1 must be written into the
NEW_IRQ_AGR field of the level 1 interrupt handler.
Step 4: If it is an edge interrupt, read the status register to determine the
cause of the interrupt, start interrupt routine, then write 1 into the
NEW_IRQ_AGR field of the level 2 interrupt handler
CONTROL_REG. Clear the ITR of the level 1 interrupt handler, then
write 1 into the NEW_IRQ_AGR field of the level 1 interrupt handler
CONTRL_REG.