16.7.7 Instrumentation Trace Macrocell (ITM)

The ITM is an application driven trace source that supports printf style debugging to trace Operating System (OS) and application events, and emits diagnostic system information. The ITM emits trace information as packets which can be generated by three different sources with several priority levels:

  • Software trace: Software can write directly to ITM stimulus registers. This can be done using the printf function. For more information, refer to 16.7.5 Flash Patch Breakpoint (FPB).
  • Hardware trace: The ITM emits packets generated by the DWT.
  • Timestamping: Timestamps are emitted relative to packets. The ITM contains a 21-bit counter to generate the timestamp.