Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.239

Micro Trace Buffer (MTB)

In this topic:


SoC Advanced Options

Trace Advanced Options

Data Watchpoint and Trace (MTB DWT)




Micro Trace Buffer (MTB) is supported by some Cortex-M0+ microcontrollers and it provides basic execution trace functionality.


It records changes in the CPU's program flow and saves recorded trace packets in the SRAM. Both the MTB and the CPU can access the SRAM, but MTB write operations have higher priority. A debugger can then access the trace records and reconstruct the program flow, which can be used for coverage analysis. Timestamps are not available, therefore the timing analysis is not possible.



MTB does not offer any other trace capability other than execution trace.



SoC Advanced Options


Buffer Size – Specify the size in kilobytes (kB).

Buffer Address – Specify the address in the SRAM where the trace information will be stored. When specifying the address make sure that:

the application does not use this part of the memory

the address is aligned to the buffer size (e.g. if the buffer size is 1kB, the buffer address must be aligned to 0x400 as well. This is necessary when the MTB works in the cyclic mode.



Trace Advanced Options

MTB has a few more options available through the Manual trigger/recorder configuration dialog.




Start Trace Immediately - Enable trace immediately on CPU run. When this flag is unchecked, trace will need to be activated by triggering from MTB DWT module.

Stop trace when full - The trace recording will stop once the buffer is full. This option disables the MTB's cyclic mode.

Stop CPU when full - CPU (and the trace recording) will stop once the buffer is full. This option disables the MTB's cyclic mode and is disabled by default.



Data Watchpoint and Trace (MTB DWT)

The MTB_DWT is to generate TSTOP and TSTART signals of ARM Core-sight MTB. The MTB_DWT function monitors the processor address and data buses when accessing data phase, configurable watch points can be detected to trigger the appropriate response in the MTB recording. MTB_DWT supports:

addresses and address + data programmable start/stop recording

masking each bit of data

write/read and read or write operations monitor

byte, half-word and word monitor

data phase monitor function


MTB DWT dialog is available through the Manual trigger / Recorder configuration dialog in Analyzer Configuration.





Depending on CPU implementation and configuration different number of comparators can be selected for use.




Action – Select which trace trigger is generated on comparator match. This will start or stop MTB trace recording.

Linked with – A comparator can be linked with up to two other comparators to generate trigger signal based on data and address/address range comparison.



winIDEA offers superset of configuration options. Not all options and combinations are necessarily available on all devices. Refer to your target device reference manual for available configuration.



More resources

Configure Micro Trace Buffer

Copyright © 2024 TASKING Germany GmbH