UM0306 Debug support (DBG)
501/519
20.12 FPB (Flash patch breakpoint)
The FPB unit:
● implements hardware breakpoints
● patches code and data from code space to system space. This feature gives the
possibility to correct software bugs located in the Code Memory Space.
The use of a Software Patch or a Hardware Breakpoint is exclusive.
The FPB consists of:
● 2 literal comparators for matching against literal loads from Code Space and remapping
to a corresponding area in the System Space.
● 6 instruction comparators for matching against instruction fetches from Code Space.
They can be used either to remap to a corresponding area in the System Space or to
generate a Breakpoint Instruction to the core.
20.13 DWT (data watchpoint trigger)
The DWT unit consists of four comparators. They are configurable as:
● a hardware watchpoint or
● a trigger to an ETM 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
20.14 ITM (instrumentation trace macrocell)
20.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-M3 clock or the bit clock rate of the
Serial Wire Viewer (SWV) output clocks the counter.