In-Circuit Emulator
User Manual
UM016804-0208
17
Using Events to Start and Stop a Trace
1. Now we’ll define a pair of events to automatically start and stop a
trace. Use this feature, for example, to trace execution of a particular
module in your program and see the context in which the module is
running with respect to other program modules.
2. Select Tools --> Trace and Event System. Click the Enable event sys-
tem check box, and click the Break when trace buffer is full check
box.
3. Select Event 0. We’ll use this as the event to trigger a trace.
4. In the When: section, click the Program counter check box and set the
Program Counter to 03F2 and the Mask to FFFF.
5. In the Then: section, click the Trace check box and select the On
radio button.
6. Select Event 1. We’ll use this as the event to break the trace.
7. In the When: section, click the Program counter check box and set the
Program Counter to 041D and the Mask to FFFF.
8. In the Then: section, click the Trace check box. Select the Off radio
button, and select the AND BREAK radio button. Click the OK but-
ton.
9. In the Trace window, click the Clear Trace button.
10. Reset the Debugger by clicking the Reset button in the toolbar, or by
selecting Build --> Debug --> Reset.
11. Run the Debugger by clicking the Go button or by selecting Build -->
Debug --> Go.
12. Wait for the program execution to break.