Instruction trace is a non-intrusive hardware trace used to capture every instruction executed by the device. There are two types of Instruction Trace:
- PIC32 Instruction Trace
- Real Time Hardware Instruction Trace
PIC32 Instruction Trace
PIC32 Instruction Trace is only available for PIC32 MCU devices. Also, only some PIC32 MCU devices have the trace feature; please see Hardware Tool Debug Features by Device.
To use this trace, you will need the following hardware:
- PIC32 Plug-In Module (PIM) that contains a device that supports trace and has a trace port.
- MPLAB® REAL ICE™ Trace Interface Kit (AC244006) that contains a 12-inch trace cable and a trace adapter board.
If you do not have a trace cable, you can use the logic probes. Connect them as indicated below.
Table: Logic Probe Connections
Logic Probe Port Pins(1) | PIM Trace Pins(2) | ||
---|---|---|---|
No. | Name | No. | Name |
4 | TCLK | 1 | TRCLK |
12 | EXT0 (TRIG1) | 3 | TRD0 |
11 | EXT1 (TRIG2) | 5 | TRD1 |
10 | EXT2 (TRIG3) | 7 | TRD2 |
9 | EXT3 (TRIG4) | 9 | TRD3 |
Note 1: For more information, see the “Logic Probe/External Trigger Interface” under Emulator Pod Hardware.
Note 2: For more information, see the “Trace Interface Kit Specification”.
To use the PIC32 Instruction Trace feature, see Instruction Trace / Profiling.
Figure: PIC32 Trace Connection with PIM
Real Time Hardware Instruction Trace
Real Time Hardware Instruction Trace is a real-time dump of the program execution stream that can be captured and analyzed. This type of trace is available on selected emulation headers (-ME2 devices).
For details, see Emulation Extension Paks and Emulation Headers.