5.4
ARM ITM/SWO Trace
ITM trace outputs UART-format data using the single-pin SWO. ITM has the provision to send this
data over multiple ports available from 0 to 31. Details of ITM/SWO trace may be found in the
following topics.
Not all SAM devices have ITM trace. See in MPLAB X IDE Help>Release Notes> Debug Features
Support>Hardware Tool Debug Features by Device.
5.4.1
How ITM Trace Works
All SAM MCUs/MPUs that support ITM trace are Arm
CoreSight
®
architecture. Currently ITM is supported in Cortex M3, M4, M33, and SC300 cores.
The CoreSight
Instrumentation Trace Macrocell
source. Supporting user code generates SoftWare Instrumentation Trace (SWIT). In addition, the block
provides a coarse-grained timestamp functionality. The main uses for this block are to:
• support printf style debugging.
• trace OS and application events.
• emit diagnostic system information.
MPLAB ICD 5 is capable of streaming UART-format ITM trace to the host computer. Trace is captured
on the TRACE/SWO pin of the 10-pin header (JTAG TDO pin). Data is buffered internally on the
MPLAB ICD 5 and is sent over the trace interface to the host computer.
Note: You can set the ITM baud rate in MPLAB X IDE. See
Figure 5-1. ITM Block Diagram
The ITM contains the following sub-blocks:
Timestamp
Sync control
Arbiter
FIFO
Emitter
Data is written to the stimulus registers using the APB interface. This data is then transmitted on the
ATB interface as SWIT packets .
5.4.2
How SWO Works with ITM Trace
The CoreSight
Serial Wire Output
on-chip trace data to a data stream that is captured by a Trace Port Analyzer (TPA) which is the MPLAB
ICD 5 In-Circuit Debugger.
Compared to the
• no formatter.
• no pattern generator.
Generates timestamp packet.
ITM synchronizer.
Arbitrates between synchronous, timestamp, and SWIT packet.
ATB First In First Out (FIFO).
ATB registered emitter.
(SWO) is a trace data drain that acts as a bridge between the
Trace Port Interface Unit
(TPIU), the SWO contains:
©
2023 Microchip Technology Inc. and its subsidiaries
Cortex
-M processor-based devices with
®
®
(ITM) block is a software application driven trace
5.4.5.4. Setup ITM
User Guide
Debugger Features
Arm
®
Trace.
DS-50003529B -
50
Need help?
Do you have a question about the MPLAB ICD 5 and is the answer not in the manual?