Debug support (DBG) RM0008
676/690
For STM32F10xxx MCU, there is only one TRACE source (the ITM). But the formatter can
not be disabled and must be used in bypass mode because the TRACECTL pin is not
assigned. This way, the Trace Port Analyzer can decode part of the formatter protocol to
determine the position of the trigger.
26.16.4 TPUI frame synchronization packets
The TPUI can generate two types of synchronization packets:
● The Frame Synchronization packet (or Full Word Synchronization packet)
It consists of the word: 0x7F_FF_FF_FF (LSB emitted first). This sequence can not
occur at any other time provided that the ID source code 0x7F has not been used.
It is output periodically between frames.
In continuous mode, the TPA must discard all these frames once a synchronization
frame has been found.
● The Half-Word Synchronization packet
It consists of the half word: 0x7F_FF (LSB emitted first).
It is output periodically between or within frames.
These packets are only generated in continuous mode and enable the TPA to detect
that the TRACE port is in IDLE mode (no TRACE to be captured). When detected by
the TPA, it must be discarded.
26.16.5 Emission of synchronization frame packet
There is no Synchronization Counter register implemented in the TPIU of the core.
Consequently, the synchronization trigger can only be generated by the DWT. Refer to the
registers DWT Control Register (bits SYNCTAP[11:10]) and the DWT Current PC Sampler
Cycle Count Register.
The TPUI Frame synchronization packet (0x7F_FF_FF_FF) is emitted:
● after each TPIU reset release. This reset is synchronously released with the rising
edge of TRACECLKIN clock. This means that this packet is emitted once the bit
IO_TRACEN of the DBGMCU_CFG register has been set. In this case, the word
0x7F_FF_FF_FF is not followed by any formatted packet.
● at each DWT trigger (assuming DWT has been previously configured). Two cases
occur:
– If the bit SYNENA of the ITM is reset, only the word 0x7F_FF_FF_FF is emitted
without any formatted stream which follows.
– If the bit SYNENA of the ITM is set, then the ITM synchronization packets will
follow (0x80_00_00_00_00_00), formatted by the TPUI (trace source ID added).
26.16.6 Synchronous mode
The trace data output size can be configured to 4, 2 or 1 pin: TRACED(3:0)
The output clock is output to the debugger (TRACECK)
Here, TRACECLKIN is driven internally and is connected to HCLK only when TRACE is
used.
Note: In this synchronous mode, it is not required to provide a stable clock frequency.