263
CHAPTER 15 INTERRUPT FUNCTIONS
Preliminary User’s Manual U16035EJ1V0UM
Figure 15-14. Nesting Examples (1/2)
Example 1. Nesting occurs twice
During servicing of interrupt INTxx, two interrupt requests, INTyy and INTzz, are acknowledged, and nesting takes
place. Before each interrupt request is acknowledged, the EI instruction must always be issued to enable interrupt
request acknowledge.
Example 2. Nesting does not occur due to priority control
Main processing
INTxx servicing
INTyy servicing
INTxx
(PR = 0)
INTyy
(PR = 1)
EI
RETI
IE = 0
IE = 0
EI
1 instruction execution
RETI
Interrupt request INTyy issued during servicing of interrupt INTxx is not acknowledged because its priority is lower
than that of INTxx, and nesting does not take place. The INTyy interrupt request is held pending, and is acknowledged
following execution of one main processing instruction.
PR = 0: Higher priority level
PR = 1: Lower priority level
IE = 0:
Interrupt request acknowledge disabled
Main processing
INTxx servicing
INTyy servicing
INTzz servicing
EI
EI
EI
RETI
RETI
RETI
INTxx
(PR = 1)
INTyy
(PR = 0)
INTzz
(PR = 0)
IE = 0
IE = 0
IE = 0