Ensuring good ETM Trace quality

기술노트 200304






2021-06-01 오전 8:27


To ensure that your ETM trace hardware is configured for optimal performance, follow the instructions in this Technical Note.


General hints

For good trace performance, you need:

  • good GND
  • short/equal length for signal cables
  • reliable, external power for the board

ETM trace quality

In some cases, you might see the following message in the Debug Log window:

Trace validation FAILED. Reason: Incorrect trace ID

Check trace pin configuration

In most cases, the reason for the above is that the ETM trace pins are configured as GPIO pins by the application running in the MCU. On many MCUs, the ETM trace pins can be configured as other functions (SPI, GPIO etc.), and this will stop the ETM trace from working.

Check trace line length

Another reason for this error might be ETM trace connection lines of bad quality, for example, different length jumper cables soldered in place temporarily.

Since high-speed ETM trace means high frequency signals, the signal lines need to be short and of equal length. Check that all lines that should be connected to GND are connected to good GND.

Check power source

We have seen cases where powering the board via the debug probe works at first when the MCU clock speed is low. But then, increasing the MCU clock speed leads to increased power usage, which may cause trouble for ETM tracing. Powering the board with external power solves this.

ETM trace pin connections

In some cases, you might also see the following message in the Debug Log window:

Trace: Calibration failed - capture will not start

Check board schematics

Investigate the board schematics. Check that all four ETM trace lines are physically connected from the MCU to the debug connector.

Check trace pin enabling

Investigate that ETM trace pins are enabled and configured for ETM trace usage. This configuration is normally done by C-SPY debugger macros.

For example, for ST STM32F4x devices, the Debug Log window should show that the arm\config\debugger\ST\STM32F4xx.dmac macro file is loaded.

Open the dmac file corresponding to your MCU device in an editor to see which MCU pins are configured for ETM trace. See also Technical Note 190507.


To ensure good ETM trace performance, follow the recommendations above.


All product names are trademarks or registered trademarks of their respective owners.


죄송하지만, 당사 사이트에서는 Internet Explorer를 지원하지 않습니다.보다 편안한 사이트를 위해 Chrome, Edge, Firefox 등과 같은 최신 브라우저를 사용해 주시길 부탁드립니다.