UPD784026 Renesas Electronics Corporation., UPD784026 Datasheet - Page 609

no-image

UPD784026

Manufacturer Part Number
UPD784026
Description
16/8-bit Single-chip Microcontrollers
Manufacturer
Renesas Electronics Corporation.
Datasheet
20.12 RESTORING INTERRUPT FUNCTION TO INITIAL STATE
NMI pin input, etc., the entire system must be restored to its initial state. In the PD784026, interrupt acknowledgment
related priority control is performed by hardware. This interrupt acknowledgment related hardware must also be restored
to its initial state, otherwise subsequent interrupt acknow-ledgment control may not be performed normally.
performing initialization by hardware is by RESET input.
If an inadvertent program loop or system error is detected by means of an operand error interrupt, the watchdog timer,
A method of initializing interrupt acknowledgment related hardware in the program is shown below. The only way of
Example
IRESL
RETVAL :
NEXT
MOVW MK0, #0FFFFH
MOV
:
CMP
BZ
MOVG SP, #RETVAL
RETI
DW
DB
DB
:
• It is necessary to ensure that a non-maskable interrupt request is not generated via the NMI pin
• After this, internal peripheral hardware initialization and interrupt control register initialization are
• When interrupt control register initialization is performed, the interrupt request flags must be
during execution of this program.
performed.
cleared (0).
MK1L, #0FFH
ISPR, #0
$NEXT
LOWW (IRESL)
0
HIGHW (IRESL)
CHAPTER 20 INTERRUPT FUNCTIONS
;
;
;
;
;
;
Mask all maskable interrupts
No interrupt service programs running?
Forcibly change SP location
Forcibly terminate running interrupt service program, return
address = IRESL
Stack data to return to IRESL with RETI instruction
LOWW & HIGHW are assembler operators for calculating low-order
16 bits & high-order 16 bits respectively of symbol NEXT
569

Related parts for UPD784026