SPI Trace

SPI trace can be used only with an 8-pin ICSP connection. Trace clock and data are provided through pins 7 (DAT) and 8 (CLK). 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 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 Project Properties>ICE4>Clock options category.

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