
DS4830 User’s Guide
163
Table 21-4. Output from Read Register Map Command
21.2.3 – Single Step Operation (Trace)
The debug engine supports single step operation in debug mode by executing a Trace command from the host. The
debug engine allows the CPU to return to its normal program execution for one cycle and then forces a debug mode re-
entry. The steps for the Trace command are:
1) Set status to 10b (debug-busy)
2) Pop the return address from the stack
3) Set the IGE bit to logic 1 if debug mode was activated when IGE=1.
4) Supply the CPU with an instruction addressed by the return address
5) Stall the CPU at the end of the instruction execution
6) Block the next instruction fetch from program memory
7) Push the return address onto the stack
8) Set the contents of IP to x8010h
9) Clear the IGE bit to 0 to disable the interrupt handler
10) Halt CPU operation
11) Set the status to debug-idle
Note that the trace operation uses a return address from the stack as a legitimate address for program fetching. The host
must maintain consistency of program flow during the debug process. The Instruction Pointer is automatically incremented
after each trace operation, thus a new return address will be pushed onto the stack before returning the control to the
Kommentare zu diesen Handbüchern