Rev. 3.0, 10/02, page 87 of 686
5.6
Interrupt Control Modes and Interrupt Operation
The interrupt controller has two modes: interrupt control mode 0 and interrupt control mode 2.
Interrupt operations differ depending on the interrupt control mode. The interrupt control mode is
selected by SYSCR. Table 5.3 shows the differences between interrupt control mode 0 and
interrupt control mode 2.
Table 5.3
Interrupt Control Modes
Interrupt
Control Mode
Priority Setting
Register
Interrupt Mask
Bits
Description
0
Default
I
The priority of interrupt sources are fixed at the
default settings.
Interrupt sources except for NMI is marked by
the I bit.
2
IPR
I2 to I0
8-level interrupt mask control is performed by
bits I2 to I0.
8 priority levels other than NMI can be set with
IPR.
5.6.1
Interrupt Control Mode 0
In interrupt control mode 0, interrupt requests except for NMI is masked by the I bit of CCR in the
CPU. Figure 5.3 shows a flowchart of the interrupt acceptance operation in this case.
1. If an interrupt source occurs when the corresponding interrupt enable bit is set to 1, an interrupt
request is sent to the interrupt controller.
2. If the I bit is set to 1, only an NMI interrupt is accepted, and other interrupt requests are held
pending. If the I bit is cleared, an interrupt request is accepted.
3. Interrupt requests are sent to the interrupt controller, the highest-ranked interrupt according to
the priority system is accepted, and other interrupt requests are held pending.
4. When the CPU accepts an interrupt request, it starts interrupt exception handling after
execution of the current instruction has been completed.
5. The PC and CCR are saved to the stack area by interrupt exception handling. The PC saved on
the stack shows the address of the first instruction to be executed after returning from the
interrupt handling routine.
6. Next, the I bit in CCR is set to 1. This masks all interrupts except NMI.
7. The CPU generates a vector address for the accepted interrupt and starts execution of the
interrupt handling routine at the address indicated by the contents of the vector address in the
vector table.
Summary of Contents for H8S/2215 Series
Page 4: ...Rev 3 0 10 02 page iv of lviii ...
Page 6: ...Rev 3 0 10 02 page vi of lviii ...
Page 28: ...Rev 3 0 10 02 page xxviii of lviii ...
Page 122: ...Rev 3 0 10 02 page 64 of 686 ...
Page 132: ...Rev 3 0 10 02 page 74 of 686 ...
Page 156: ...Rev 3 0 10 02 page 98 of 686 ...
Page 198: ...Rev 3 0 10 02 page 140 of 686 ...
Page 320: ...Rev 3 0 10 02 page 262 of 686 ...
Page 384: ...Rev 3 0 10 02 page 326 of 686 ...
Page 474: ...Rev 3 0 10 02 page 416 of 686 ...
Page 608: ...Rev 3 0 10 02 page 550 of 686 ...
Page 614: ...Rev 3 0 10 02 page 556 of 686 ...
Page 650: ...Rev 3 0 10 02 page 592 of 686 ...
Page 652: ...Rev 3 0 10 02 page 594 of 686 ...
Page 680: ...Rev 3 0 10 02 page 622 of 686 ...
Page 732: ...Rev 3 0 10 02 page 674 of 686 ...
Page 740: ...Rev 3 0 10 02 page 682 of 686 ...