CHAPTER 7 INTERRUPT/EXCEPTION PROCESSING FUNCTION
168
User’s Manual U15195EJ5V0UD
7.5.2 Debug
trap
The debug trap is an exception that can be acknowledged every time and is generated by execution of the
DBTRAP instruction.
When the debug trap is generated, the CPU performs the following processing.
(1) Operation
When the debug trap is generated, the CPU performs the following processing, transfers control to the debug
monitor routine, and shifts to debug mode.
(1) Saves the restored PC to DBPC.
(2) Saves the current PSW to DBPSW.
(3) Sets the NP, EP and ID bits of the PSW.
(4) Sets the handler address (00000060H) corresponding to the debug trap to the PC and transfers control.
Figure 7-12 illustrates the processing of the debug trap.
Figure 7-12. Debug Trap Processing
DBTRAP instruction
DBPC
DBPSW
PSW.NP
PSW.EP
PSW.ID
PC
Restored PC
PSW
1
1
1
00000060H
Debug monitor routine processing
CPU processing