English
Language : 

SH7764 Datasheet, PDF (518/1752 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperHTM RISC Engine Family SH-4A Series
Section 13 Interrupt Controller (INTC)
13.5 Operation
13.5.1 Interrupt Sequence
The sequence of interrupt operations is described below. Figure 13.3 is the flowchart of the
operations.
1. The interrupt request sources send interrupt request signals to the INTC.
2. The INTC selects the highest-priority interrupt from the interrupt requests sent, following the
priority levels set in INTPRI and INT2PRI0 to INT2PRI12. Lower-priority interrupts are held
pending. If two of these interrupts have the same priority level or if multiple interrupts occur
within a single module, the interrupt with the highest priority is selected according to table
13.6.
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. If the priority level is higher than the mask level, the
INTC accepts the interrupt and sends an interrupt request signal to the CPU.
4. The CPU accepts an interrupt at a break in instructions.
5. The interrupt source code is set in the interrupt event register (INTEVT).
6. SR and program counter (PC) are saved to SSR and SPC, respectively. R15 is saved to SGR at
this time.
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, execution may branch with the INTEVT value used as its offset
in order to identify the interrupt source. This enables execution to branch to the handling routine
for the individual interrupt source.
Notes: 1. When the INTMU bit in the CPU operating mode register (CPUOPM.INTMU) 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 is cleared to 0, the IMASK value in SR is not
affected by the accepted interrupt.
2. The interrupt source flag should be cleared in the interrupt handler. To ensure that an
interrupt source that should have been cleared is not inadvertently accepted again, read
the interrupt source flag after it has been cleared, wait for the time shown in table 13.7,
and then clear the BL bit or execute an RTE instruction.
3. For some interrupt sources, the interrupt mask setting (INTMSK, INT2MSKR or
INT2MSKR1) for each interrupt source must be cleared by using INTMSKCLR,
INT2MSKCR or INT2MSKCR1.
Rev. 1.00 Nov. 22, 2007 Page 462 of 1692
REJ09B0360-0100