26.17.10 Example Of Configuration - ST STM32F410 Reference Manual

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

RM0401
Address
Formatter and flush
0xE0040304
control
Formatter and flush
0xE0040300
status

26.17.10 Example of configuration

Set the bit TRCENA in the Debug Exception and Monitor Control Register (DEMCR)
Write the TPIU Current Port Size Register to the desired value (default is 0x1 for a 1-bit
port size)
Write TPIU Formatter and Flush Control Register to 0x102 (default value)
Write the TPIU Select Pin Protocol to select the sync or async mode. Example: 0x2 for
async NRZ mode (UART like)
Write the DBGMCU control register to 0x20 (bit IO_TRACEN) to assign TRACE I/Os
for async mode. A TPIU Sync packet is emitted at this time (FF_FF_FF_7F)
Configure the ITM and write the ITM Stimulus register to output a value
Table 144. Important TPIU registers (continued)
Register
Bits 31-9 = always '0
Bit 8 = TrigIn = always '1 to indicate that triggers are indicated
Bits 7-4 = always 0
Bits 3-2 = always 0
Bit 1 = EnFCont. In Sync Trace mode (Select_Pin_Protocol register
bit1:0=00), this bit is forced to '1: the formatter is automatically enabled
in continuous mode. In asynchronous mode (Select_Pin_Protocol
register bit1:0 <> 00), this bit can be written to activate or not the
formatter.
Bit 0 = always 0
The resulting default value is 0x102
Note: In synchronous mode, because the TRACECTL pin is not mapped
outside the chip, the formatter is always enabled in continuous mode -this
way the formatter inserts some control packets to identify the source of
the trace packets).
Not used in Cortex
Description
®
-M4 with FPU, always read as 0x00000008
RM0401 Rev 3
Debug support (DBG)
761/771
762

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents

Save PDF