Performance Pak SPI Trace

Serial Port Interface (SPI) trace, or simply serial trace, is a type of instrumented trace. This means that MPLAB® X IDE and MPLAB XC C compiler support are required. Also, the device must have an SPI peripheral.

For more information, see the "SPI Trace" section on the "Types of Instrumented Trace" article.

SPI Trace Connections

For serial trace, use the device SPI and pins 7 (DAT) and 8 (CLK). The device is connected to the target using high-speed/LVDS communication hardware which provides the extra lines for clock and data. The device does not have to be operating at high speeds to use this feature.

The figure shows the proper connections. As with pins 4 (PGD) and 5 (PGC), do not use pull-up or pull-down resistors, capacitors or diodes ("Target Circuit Design Precautions").

PP_SPI_Trace.jpg
Figure: Serial Trace Connections

The DAT and CLK lines are intended for use with devices that do not have built-in debug logic that allows tracing (Native trace) to use the PGD/PGC/EMUC/EMUD pins. The DAT line connects to either the target device SPI port SDO1 or SDO2. The CLK line connects to SCK1 or SCK2.

SPI Trace Usage

When you dedicate SPI 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 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 (in the Properties dialog, click the REAL ICE category, and the Clock options category.)

© 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.