More on Trace/Log ID Numbers

MPLAB® X IDE will automatically generate the ID numbers required for a trace or log macro. However, to understand the method behind the numbering, read further.

You can have 64 trace points and 64 log points. These limits are determined by port trace (eight bits). Bit 7 is used as a clock and Bit 6 is used as a flag which indicates either a trace record (1) or a log record (0).

For a trace record, the low order bits represent the trace number (nnnnnn). You could say 0-63 are the legal trace numbers and require the trace flag be set, but it was easier to combine the flag with the number and say the valid numbers are 64-127.
clock 1 n n n n n n
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
For a log record, the low order bits represent the log number (nnnnnnn).
clock 0 n n n n n n
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
© 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.