Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.174

Micro Trace Buffer (MTB)

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.



Configure MTB trace


1. Open Hardware menu / CPU Options / SoC page.

2. Select MTB Trace Capture method from the drop-down menu.


By default the MTB runs in a cyclic mode, which means that once the buffer is full, the new trace information will overwrite the old trace information.

Prior to the first use the Micro Trace Buffer must be configured through the Hardware / CPU Options / SoC Advanced page:

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.



MTB Trace Advanced Options


Micro Trace Buffer has a few more options available through the Manual trigger/recorder configuration dialog.

1. Open View menu / Analyzer.

2. Press Analyzer Configuration buttonAnalyzerConButton in Analyzer toolbar.

3. Check Manual Trigger/Recorder configuration option.

4. Press Configure.



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.



Micro Trace Buffer 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



Open Trigger dialog

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

1. Click View menu / Analyzer.

2. Click Analyzer Configuration buttonAnalyzerConButton in Analyzer toolbar

3. Check Manual Trigger/Recorder configuration in Hardware page

4. Press Configure button

5. Select the MTB DWT page.


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.


Copyright© iSYSTEM AG Carl-Zeiss-Str.1 85247 Schwabhausen Germany