CHAPTER 14 INTERRUPT FUNCTIONS
User’s Manual U14826EJ5V0UD
146
14.4.3 Multiple interrupt servicing
Multiple interrupt servicing in which another interrupt is acknowledged while an interrupt is being serviced can be
performed using a priority order system. When two or more interrupts are generated at once, interrupt servicing is
performed according to the priority assigned to each interrupt request in advance (see
Table 14-1
).
Figure 14-11. Example of Multiple Interrupts
Example 1. A multiple interrupt is acknowledged
INTyy
EI
Main processing
EI
INTyy servicing
INTxx servicing
RETI
IE = 0
INTxx
RETI
IE = 0
During interrupt INTxx servicing, interrupt request INTyy is acknowledged, and multiple interrupts are generated.
The EI instruction is issued before each interrupt request acknowledgment, and the interrupt request acknowledgment
enable state is set.
Example 2. Multiple interrupts are not generated because interrupts are not enabled
INTyy
EI
Main processing
RETI
INTyy servicing
INTxx servicing
IE = 0
INTxx
RETI
INTyy is held pending
IE = 0
Because interrupts are not enabled in interrupt INTxx servicing (the EI instruction is not issued), interrupt request
INTyy is not acknowledged, and multiple interrupts are not generated. The INTyy request is held pending and
acknowledged after the INTxx servicing is performed.
IE = 0: Interrupt request acknowledgment disabled
Содержание PD789860
Страница 2: ...User s Manual U14826EJ5V0UD 2 MEMO ...