Table 304. Main Etm Registers; Etm (Embedded Trace Macrocell) - STMicroelectronics STM32F405 Reference Manual

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

RM0090
configuration
Write 0xC5ACCE55 to the ITM Lock Access Register to unlock the write access to the
ITM registers
Write 0x00010005 to the ITM Trace Control Register to enable the ITM with Sync
enabled and an ATB ID different from 0x00
Write 0x1 to the ITM Trace Enable Register to enable the Stimulus Port 0
Write 0x1 to the ITM Trace Privilege Register to unmask stimulus ports 7:0
Write the value to output in the Stimulus Port Register 0: this can be done by software
(using a printf function)
38.15

ETM (Embedded trace macrocell)

38.15.1
General description
The ETM enables the reconstruction of program execution. Data are traced using the Data
Watchpoint and Trace (DWT) component or the Instruction Trace Macrocell (ITM) whereas
instructions are traced using the Embedded Trace Macrocell (ETM).
The ETM transmits information as packets and is triggered by embedded resources. These
resources must be programmed independently and the trigger source is selected using the
Trigger Event Register (0xE0041008). An event could be a simple event (address match
from an address comparator) or a logic equation between 2 events. The trigger source is
one of the fourth comparators of the DWT module, The following events can be monitored:
Clock cycle matching
Data address matching
For more informations on the trigger resources refer to
watchpoint
The packets transmitted by the ETM are output to the TPIU (Trace Port Interface Unit). The
formatter of the TPIU adds some extra packets (refer to
interface
38.15.2
Signal protocol, packet types
This part is described in the chapter 7 ETMv3 Signal Protocol of the ARM
document.
38.15.3
Main ETM registers
For more information on registers refer to the chapter 3 of the ARM
specification.
Address
0xE0041FB0 ETM Lock Access
0xE0041000 ETM Control
register)
trigger).
unit)) and then outputs the complete packet sequence to the debugger host.

Table 304. Main ETM registers

Register
DocID018909 Rev 11
Section 38.13: DWT (data
Section 38.17: TPIU (trace port
Write 0xC5ACCE55 to unlock the write access to the
other ETM registers.
This register controls the general operation of the ETM,
for instance how tracing is enabled.
Debug support (DBG)
®
IHI 0014N
®
IHI 0014N
Details
1689/1731
1701

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

Table of Contents

Save PDF