Instrumented Trace Resource Usage Examples

The following examples are for illustration only. Your results may vary based upon compiler/assembler version, command line options, MPLAB® X IDE version, size of data variable being logged, interrupt state, and device in use. All examples include argument setup, function call, and return time in their cycle counts.

The PIC18FXXJ MCU examples are compiled/assembled for non-priority interrupt usage (30 instructions). For priority interrupt usage, the value is 57; and for no interrupt usage, the value is 15.

The dsPIC33F DSC examples show nine instructions specified in the 16-bit library size for memcpy().

Native SPI I/O Port
Library Size (in instructions) 23 + 30 37 + 30 25 + 30
GPRs Used (in bytes) 8 6 6
__TRACE(id) instruction cycles 80 54 42
__LOG(id, BYTE) instruction cycles 168 90 57
Table 1: PIC18FXXJ device running at 4 MHz (1 MIPS) with assembly project

Native SPI I/O Port
Library Size (in instructions) 75 + 30 87 + 30 112 + 30
GPRs Used (in bytes) 10 8 8
__TRACE(id) instruction cycles 79 71 55
__LOG(id, BYTE) instruction cycles 225 169 162
Table 2: PIC18FXXJ device running at 40 MHz (10 MIPS) with C project

Native SPI I/O Port
Library Size (in instructions) 87 + 9 92 + 9 93 + 9
GPRs Used (in bytes) 18 14 0
__TRACE(id) instruction cycles 80 53 32
__LOG(id, BYTE) instruction cycles 212 124 106
Table 3: dsPIC33F device running at 10 MIPS with C project

Native SPI I/O Port
__TRACE(id) instruction cycles 88 53 32
__LOG(id, BYTE) instruction cycles 227 138 106
Table 4: dsPIC33F device running at 16 MIPS with C project

Native SPI I/O Port
__TRACE(id) instruction cycles 100 53 32
__LOG(id, BYTE) instruction cycles 251 152 106
Table 5: dsPIC33F device running at 34 MIPS with C project
© 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.