Interrupt Servicing Operation; Non-Maskable Interrupt Request Acknowledgment Operation - NEC PD789860 User Manual

8-bit single-chip microcontrollers pd789860 subseries; pd789861 subseries
Table of Contents

Advertisement

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.
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.
example is shown below.
<Example>
CHAPTER 14 INTERRUPT FUNCTIONS
Program example in which watchdog timer is used as non-maskable interrupt and
program branches to reset vector when interrupt occurs
XVECT
CSEG
DW
IRESET
DW
IKR
DW
IWDT
:
XRST
CSEG
IRESET: DI
MOVW AX,#0FEFFH
MOVW SP, AX
:
:
IWDT:
(Interrupt servicing)
MOVW AX,#0080H
PUSH
AX
RETI
User's Manual U14826EJ5V0UD
Figure 14-7 shows the acknowledgment
AT
0000H
;(00)
RESET
;(02)
KeyReturn
;(04)
INTWDT
AT
0080H
A program
141

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pd78e9861aPd78e9860aPd789860(a)Pd789861

Table of Contents