Download Print this page

ST STM32L4+ Series Reference Manual page 2263

Hide thumbs Also See for STM32L4+ Series:

Advertisement

RM0432
Address
@E0000E40
@E0000E00
@E0000000-
E000007C
Example of configuration
To output a simple value to the TPIU:
Configure the TPIU and assign TRACE I/Os by configuring the DBGMCU_CR (refer to
Section 57.17.2: TRACE pin assignment
configuration register
Write 0xC5AC CE55 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 synchronous
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)
57.15
ETM (Embedded trace macrocell)
57.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 (0xE004 1008). An event could be a simple event (address match from
an address comparator) or a logic equation between two events. The trigger source is one
of the four 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
Table 434. Main ITM registers (continued)
Register
ITM trace privilege
ITM trace enable
Stimulus port
registers 0-31
(DBGMCU_CR))
trigger).
RM0432 Rev 6
Bit 3: mask to enable tracing ports31:24
Bit 2: mask to enable tracing ports23:16
Bit 1: mask to enable tracing ports15:8
Bit 0: mask to enable tracing ports7:0
Each bit enables the corresponding stimulus port to generate
trace
Write the 32-bits data on the selected stimulus port (32
available) to be traced out
and
Section 57.16.3: Debug MCU
Section 57.13: DWT (data
Debug support (DBG)
Details
2263/2301
2278

Advertisement

loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel