Skip to main content
mete
Senior
November 10, 2020
Solved

how to enable ETM Trace

  • November 10, 2020
  • 2 replies
  • 3345 views

Hello,

I am using STM32F4 (nucleo F439ZI), so Cortex-M4. I am trying to enable ETM tracing and see something on TRACE pins, I am using STLINK for SWD and observing TRACE pins with an oscilloscope. I enable the trace pins on pin configuration, and enable -I think- trace related things in debug regs and then tried various things with ETM regs but I cannot see any output from TRACE pins. Is there any hint or a guide to do this ?

Thanks.

Mete

This topic has been closed for replies.
Best answer by mete

I realized even if I select trace output for GPIOs in STM32CubeMX configuration, the pins were not initialized as such in the autogenerated code. So initializing them manually solved the isse.

2 replies

Tesla DeLorean
Guru
November 10, 2020

The register configuration is shown here, may have other debugger side dependencies. Probably want the technical materials from ARM for debugger writers.

https://community.st.com/s/question/0D50X0000BIzlEKSQZ/i-have-trouble-getting-etm-instruction-trace-out-of-stm32f411ve

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
mete
meteAuthorBest answer
Senior
November 13, 2020

I realized even if I select trace output for GPIOs in STM32CubeMX configuration, the pins were not initialized as such in the autogenerated code. So initializing them manually solved the isse.