10. Interrupt Controller (INTC)
Rev.1.00 Jan. 10, 2008 Page 337 of 1658
REJ09B0261-0100
10.5
Operation
10.5.1
Interrupt Sequence
The sequence of interrupt operations is described below. Figure 10.4 shows a flowchart of the
operations.
1. Interrupt request sources send interrupt request signals to the INTC.
2. The INTC selects the interrupt with the highest priority among the interrupts that have been
sent, according to the priority set in INTPRI and INT2PRI0 to INT2PRI9. Lower priority
interrupts are held as pending interrupts. If two of the interrupts have the same priority level or
multiple interrupts are generated by a single module, the interrupt with the highest priority is
selected according to table 10.13.
3. The priority level of the interrupt selected by the INTC is compared with the interrupt mask
level (IMASK) set in SR of the CPU. Only the interrupt with a higher priority than the IMASK
bit is accepted, and an interrupt request signal is sent to the CPU.
4. The CPU accepts an interrupt at the next break between instructions.
5. The interrupt source code is set in the interrupt event register (INTEVT).
6. The SR and program counter (PC) are saved in SSR and SPC, respectively. At that time, R15
is saved in SGR.
7. The BL, MD, and RB bits in SR are set to 1.
8. Execution jumps to the start address of the interrupt exception handling routine (the sum of the
value set in the vector base register (VBR) and H'0000 0600).
In the exception handling routine, the value of INTEVT is branched as an offset. This easily
enables to branch the exception handling routine to handling routine for each interrupt source.
Notes: 1. When the INTMU bit in CPUOPM is set to 1, the interrupt mask level (IMASK) in SR
is automatically set to the level of the accepted interrupt. When the INTMU bit in
CPUOPM is cleared to 0, the value of the IMASK in SR is not affected by the accepted
interrupt.
2. The interrupt source flag should be cleared during exception handling routine. To
ensure that an interrupt source which should have been cleared is not erroneously
accepted again, read the interrupt source flag after it has been cleared, and wait for the
time shown in table 10.14. Then, clear the BL bit or execute an RTE instruction.
3. The IRQ interrupts, IRL interrupts, on-chip peripheral module interrupts are initialized
to the interrupt masking state by a power-on reset. Therefore, clear the interrupt
masking for each interrupt , INTMSK0, INTMSK1, and INT2MSKR by using
INTMSKCLR0, INTMSKCLR1, and INT2MSKCLR.
Summary of Contents for SH7781
Page 4: ...Rev 1 00 Jan 10 2008 Page iv of xxx REJ09B0261 0100 ...
Page 74: ...2 Programming Model Rev 1 00 Jan 10 2008 Page 44 of 1658 REJ09B0261 0100 ...
Page 272: ...8 Caches Rev 1 00 Jan 10 2008 Page 242 of 1658 REJ09B0261 0100 ...
Page 376: ...10 Interrupt Controller INTC Rev 1 00 Jan 10 2008 Page 346 of 1658 REJ09B0261 0100 ...
Page 694: ...13 PCI Controller PCIC Rev 1 00 Jan 10 2008 Page 664 of 1658 REJ09B0261 0100 ...
Page 762: ...14 Direct Memory Access Controller DMAC Rev 1 00 Jan 10 2008 Page 732 of 1658 REJ09B0261 0100 ...
Page 788: ...15 Clock Pulse Generator CPG Rev 1 00 Jan 10 2008 Page 758 of 1658 REJ09B0261 0100 ...
Page 828: ...17 Power Down Mode Rev 1 00 Jan 10 2008 Page 798 of 1658 REJ09B0261 0100 ...
Page 846: ...18 Timer Unit TMU Rev 1 00 Jan 10 2008 Page 816 of 1658 REJ09B0261 0100 ...
Page 1292: ...24 Multimedia Card Interface MMCIF Rev 1 00 Jan 10 2008 Page 1262 of 1658 REJ09B0261 0100 ...
Page 1326: ...25 Audio Codec Interface HAC Rev 1 00 Jan 10 2008 Page 1296 of 1658 REJ09B0261 0100 ...
Page 1482: ...28 General Purpose I O Ports GPIO Rev 1 00 Jan 10 2008 Page 1452 of 1658 REJ09B0261 0100 ...
Page 1538: ...30 User Debugging Interface H UDI Rev 1 00 Jan 10 2008 Page 1508 of 1658 REJ09B0261 0100 ...
Page 1688: ...Appendix Rev 1 00 Jan 10 2008 Page 1658 of 1658 REJ09B0261 0100 ...
Page 1691: ......
Page 1692: ...SH7785 Hardware Manual ...