Restore - NEC V850ES/KE1+ User Manual

32-bit single-chip microcontrollers
Table of Contents

Advertisement

CHAPTER 17 INTERRUPT/EXCEPTION PROCESSING FUNCTION

17.5.2 Restore

Execution is restored from software exception processing by the RETI instruction.
When the RETI instruction is executed, the CPU performs the following processing and transfers control to the
address of the restored PC.
<1> Loads the restored PC and PSW from EIPC and EIPSW because the PSW.EP bit is 1.
<2> Transfers control to the address of the restored PC and PSW.
Figure 17-9 shows the processing flow of the RETI instruction.
1
Caution When the EP bit and the NP bit are changed by the LDSR instruction during software
exception processing, in order to restore the PC and PSW correctly during restoring by the
RETI instruction, it is necessary to set the PSW.EP bit back to 1 using the LDSR instruction
immediately before the RETI instruction.
Remark The solid line shows the CPU processing flow.
560
Figure 17-9. RETI Instruction Processing
RETI instruction
PSW.EP
0
PSW.NP
0
PC
EIPC
PSW
EIPSW
Original processing restored
User's Manual U16896EJ2V0UD
1
PC
FEPC
PSW
FEPSW

Advertisement

Table of Contents
loading

This manual is also suitable for:

?pd70f3302?pd703302?pd70f3302y?pd703302y

Table of Contents