CHAPTER 14 INTERRUPT FUNCTIONS
User’s Manual U14826EJ5V0UD
141
14.4 Interrupt Servicing Operation
14.4.1 Non-maskable interrupt request acknowledgment operation
The non-maskable interrupt request is unconditionally acknowledged even when interrupts are disabled. It is not
subject to interrupt priority control and takes precedence over all other interrupts.
When the non-maskable interrupt request is acknowledged, PSW and PC are saved to the stack in that order, the
IE flag is reset to 0, the contents of the vector table are loaded to the PC, and then program execution branches.
Figure 14-5 shows the flowchart from non-maskable interrupt request generation to acknowledgment. Figure 14-6
shows the timing of non-maskable interrupt request acknowledgment. Figure 14-7 shows the acknowledgment
operation if multiple non-maskable interrupts are generated.
Caution The
µ
PD789860 and 789861 Subseries have two non-maskable interrupt sources. Therefore,
during execution of a non-maskable interrupt servicing program, a new non-maskable interrupt
request is not acknowledged until the RETI instruction is executed. Be sure to execute the RETI
instruction after the interrupt servicing program has been executed.
When using the watchdog timer as a non-maskable interrupt, push the address of restore
destination before executing the RETI instruction. If the RETI instruction is executed without
pushing the restore destination, the program will jump to an illegal address. A program
example is shown below.
<Example> Program example in which watchdog timer is used as non-maskable interrupt and
program branches to reset vector when interrupt occurs
XVECT
CSEG
AT 0000H
DW
IRESET
;(00)
RESET
DW
IKR
;(02)
KeyReturn
DW
IWDT
;(04)
INTWDT
:
XRST
CSEG
AT 0080H
IRESET:
DI
MOVW AX,#0FEFFH
MOVW SP,
AX
:
:
IWDT:
(Interrupt servicing)
MOVW AX,#0080H
PUSH AX
RETI
Содержание PD789860
Страница 2: ...User s Manual U14826EJ5V0UD 2 MEMO ...