Types of Instrumented Trace

Currently, there are three types of trace. All types are language-tool-version dependent, and stream data in real-time to MPLAB® X IDE.

The pluses and minuses of using each trace type, as well as the type of communication available (standard and/or high-speed), are summarized below.

Type of Trace Speed Code Size Impact Real Time Op Pin Usage Device Feature Needed Communication - Standard Communication - High Speed
Native Trace Fast(1) Large Close None Built-in debug 15 MIPS or less Greater than 15 MIPS
SPI Trace Faster(1) Medium Closer SPI pins SPI No Yes
I/O Port Trace Fastest Small Closest 8-pin port None Yes(2) Yes(2)

Note 1:
For Native trace running at speeds higher than 15 MIPS and for Serial Peripheral Interface (SPI) Trace capability, the Performance Pak may be needed. The actual cutoff speed may vary depending on layout, noise, and similar considerations.

Note 2:
Also requires connection from device port to emulator logic probe port.

Native Trace

Native trace can be used with either standard or high-speed communications, with no additional connections; the information is conveyed via the PGD/PGC/EMUC/EMUD pins. This two-wire interface uses the trace macro format (see "Setting Up Instrumented Trace in MPLAB X IDE").

For 8-bit and 16-bit devices, Native trace requires that you enter the clock speed (Project Properties dialog, REAL ICE category, Clock options category.)

If Native trace is used, then data captures cannot be used as these features use the same device resource. Breakpoints are still available; but, be aware that Native trace will use one breakpoint for tracing. This will not be reflected on the Device Debug Resource toolbar.

To use data capture triggers, you must disable Native trace (see "Disabling Instrumented Trace").

SPI Trace

SPI trace can be used only with high-speed/Low-Voltage Differential Signaling (LVDS) communication hardware, purchased as the Performance Pak (AC244002). Trace clock and data are provided through pins seven (DAT) and eight (CLK) on the receiver board of the LVDS connection. The device does not have to be operating at high speeds to use this feature.

When you dedicate these pins to tracing, any multiplexed function on these pins cannot be used by the application.

For devices with remappable peripheral pins, be aware that the SPI trace macro does not touch any Peripheral Pin Select (PPS) register and does not need to know how the peripheral is mapped to a certain pin; it will write to the SPI1 or SPI2 selected in MPLAB X IDE.

SPI trace does require that you enter the clock speed (Project Properties , REAL ICE category, and the Clock options category.)

For hardware connections, see the "Performance Pak for the MPLAB REAL ICE™ In-Circuit Emulator User’s Guide" (DS50002528).

The SPI interface uses the trace macro format (see "Setting Up Instrumented Trace in MPLAB X IDE").

I/O Port Trace

I/O Port trace can be used with either standard or high-speed communications. Trace clock and data are provided from a device 8-pin I/O port through the emulator's logic probe connector.

The I/O port must have all eight pins available for trace. The port must not be multiplexed with the currently-used PGC and PGD pins. Therefore, review the data sheet of the selected device to determine the uninitialized/default port pin states and change them as necessary.

For hardware connections, see "I/O Port Trace Connections (Logic Port)".

The port interface uses the trace macro format (see "Setting Up Instrumented Trace in MPLAB X IDE").

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.