CHAPTER 17 INTERRUPT/EXCEPTION PROCESSING FUNCTION
User’s Manual U16896EJ2V0UD
542
17.3.2 Restore
Execution is restored from maskable interrupt servicing 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 values of the restored PC and PSW from EIPC and EIPSW because the PSW.EP bit and the
PSW.NP bit are both 0.
(2) Transfers control to the loaded address of the restored PC and PSW.
Figure 17-5 shows the processing flow of the RETI instruction.
Figure 17-5. RETI Instruction Processing
RETI instruction
Original processing restored
PC
PSW
ISPR.
corresponding
-bit
Note
EIPC
EIPSW
0
PSW. EP
1
0
1
0
PC
PSW
FEPC
FEPSW
PSW. NP
Note
For the ISPR register, refer to
17.3.6 In-service priority register (ISPR)
.
Caution When the EP bit and the NP bit are changed by the LDSR instruction during maskable
interrupt servicing, in order to restore the PC and PSW correctly during restoring by the RETI
instruction, it is necessary to clear the EP bit back to 0 and the NP bit back to 0 using the
LDSR instruction immediately before the RETI instruction.
Remark
The solid line shows the CPU processing flow.
Содержание V850ES/KE1+
Страница 2: ...User s Manual U16896EJ2V0UD 2 MEMO...