IT lexicon › Hardware › Micro Trace Buffer (MTB)

Micro Trace Buffer (MTB)

Hardware På svenska → Updated: 2026-11-04

ARM's budget instruction trace for small cores: it records every branch into a slice of ordinary SRAM.

Full instruction trace via ETM needs a dedicated trace port, an expensive probe and silicon that makers of ten-cent chips would rather leave out. MTB arrived with the Cortex-M0+ and does something simpler: on every non-sequential change of program flow it stores a source/destination address pair in a reserved region of SRAM, wrapping around like a ring buffer.

When the core halts — at a breakpoint or inside a HardFault handler — the debugger reads the buffer out over SWD and reconstructs the last few hundred branches. That is often exactly what you need to see which path the code took to the crash. The catch is that the memory spent on tracing is memory the program can't use.

← Back to the lexicon