Dwt (Data Watchpoint Trigger); Itm (Instrumentation Trace Macrocell); General Description; Time Stamp Packets, Synchronization And Overflow Packets - ST STM32F100 Series Reference Manual

Advanced arm-based 32-bit mcus
Hide thumbs Also See for STM32F100 Series:
Table of Contents

Advertisement

Debug support (DBG)
25.13

DWT (data watchpoint trigger)

The DWT unit consists of four comparators. They are configurable as:
a hardware watchpoint or
a PC sampler or
a data address sampler
The DWT also provides some means to give some profiling informations. For this, some
counters are accessible to give the number of:
Clock cycle
Folded instructions
Load store unit (LSU) operations
Sleep cycles
CPI (clock per instructions)
Interrupt overhead
25.14

ITM (instrumentation trace macrocell)

25.14.1

General description

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 as:
Software trace. Software can write directly to the ITM stimulus registers to emit
packets.
Hardware trace. The DWT generates these packets, and the ITM emits them.
Time stamping. Timestamps are emitted relative to packets. The ITM contains a 21-bit
counter to generate the timestamp. The Cortex
Serial Wire Viewer (SWV) output clocks the counter.
The packets emitted by the ITM are output to the TPIU (Trace Port Interface Unit). The
formatter of the TPIU adds some extra packets (refer to TPIU) and then output the complete
packets sequence to the debugger host.
The bit TRCEN of the Debug Exception and Monitor Control register must be enabled
before programming or using the ITM.
25.14.2

Time stamp packets, synchronization and overflow packets

Time stamp packets encode time stamp information, generic control and synchronization. It
uses a 21-bit timestamp counter (with possible prescalers) which is reset at each time
stamp packet emission. This counter can be either clocked by the CPU clock or the SWV
clock.
A synchronization packet consists of 6 bytes equal to 0x80_00_00_00_00_00 which is
emitted to the TPIU as 00 00 00 00 00 80 (LSB emitted first).
A synchronization packet is a timestamp packet control. It is emitted at each DWT trigger.
686/709
®
-M3 clock or the bit clock rate of the
RM0041 Rev 6
RM0041

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F100 Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents