ARM® Trace
Bus (ATB)
Interface
Asynchronous FIFO
Advance
Peripheral
Bus (APB)
Interface
Trace Out
(serializer)
Debug
ATB
Slave
Port
APB
Slave
Port
Serial Wire
Trace Port
(SWO)
Debug Peripherals Description
92
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Cortex-M4F Peripherals
•
Folded instructions
•
Load Store Unit (LSU) operations
•
Sleep cycles
•
CPI, that is all instruction cycles except for the first cycle
•
Interrupt overhead
DWT can be configured to generate PC samples at defined intervals, and to generate interrupt event
information. The DWT provides periodic requests for protocol synchronization to the ITM and the TPIU.
2.3.3 ITM
Instrumentation Trace Macrocell is an optional application-driven trace source that supports printf style
debugging to trace operating system and application events, and generates diagnostic system information.
The ITM generates trace information as packets. There are various sources that can generate packets. If
multiple sources generate packets at the same time, the ITM arbitrates the order in which packets are
output. The different sources in decreasing order of priority are:
•
Software trace: Software can write directly to ITM stimulus registers to generate packets.
•
Hardware trace: The DWT generates these packets, and the ITM outputs them.
•
Time stamping: Timestamps are generated relative to packets. The ITM contains a 21-bit counter to
generate the timestamp. The Cortex-M4 clock or the bitclock rate of the Serial Wire Viewer (SWV)
output clocks the counter.
NOTE:
ITM registers are fully accessible in privileged mode. In user mode, all registers can be read,
but only the Stimulus registers and Trace Enable registers can be written, and only when the
corresponding Trace Privilege register bit is set. Invalid user mode writes to the ITM registers
are discarded.
2.3.4 TPIU
Trace Port Interface Unit is an optional component that acts as a bridge between the on-chip trace data
from the Instrumentation Trace Macrocell (ITM) to a data stream. The TPIU encapsulates IDs where
required, and the data stream is then captured by a Trace Port Analyzer (TPA).
The TPIU can output trace data in a Serial Wire Output (SWO) format.
Figure 2-3. TPIU Block Diagram
2.3.4.1
TPIU Components
•
Asynchronous FIFO: The asynchronous FIFO enables trace data to be driven out at a speed that is not