CHAPTER 5 INTERRUPT/EXCEPTION PROCESSING FUNCTION
User’s Manual U13850EJ4V0UM
139
Figure 5-10. Example of Servicing Interrupt Requests Generated Simultaneously
Main routine
EI
Interrupt request a (level 2)
Interrupt request b (level 1)
Note 1
Interrupt request c (level 1)
Note 2
Servicing of interrupt request b
•
•
Servicing of interrupt request c
Servicing of interrupt request a
Interrupt request b and c are
acknowledged first according to their
priorities.
Because the priorities of b and c are
the same, b is acknowledged first
because it has the higher default
priority.
NMI
request
Notes 1.
Higher default priority
2.
Lower default priority
5.3.4 Interrupt control register (xxICn)
An interrupt control register is assigned to each maskable interrupt and sets the control conditions for each
maskable interrupt request.
The interrupt control register can be read/written in 8- or 1-bit units.
Caution If the following three conditions conflict, interrupt servicing is executed twice. However, when
DMA is not used, interrupt servicing is not executed twice.
•
Execution of a bit manipulation instruction corresponding to the interrupt request flag
(xxIFn)
•
An interrupt via hardware of the same interrupt control register (xxICn) as the interrupt
request flag (xxIFn) is generated
•
DMA is started during execution of a bit manipulation instruction corresponding to the
interrupt request flag (xxIFn)
Two workarounds using software are shown below.
•
Insert a DI instruction before the software-based bit manipulation instruction and an EI
instruction after it, so that jumping to an interrupt immediately after the bit manipulation
instruction execution does not occur.
•
When an interrupt request is acknowledged, since the hardware becomes interrupt
disabled (DI state), clear the interrupt request flag (xxIFn) before executing the EI
instruction in each interrupt servicing routine.
Содержание MPD703030A
Страница 2: ...User s Manual U13850EJ4V0UM 2 MEMO ...
Страница 514: ...User s Manual U13850EJ4V0UM 514 MEMO ...