cancel
Showing results for 
Search instead for 
Did you mean: 

how to enable ETM Trace

mete
Senior II

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

1 ACCEPTED SOLUTION

Accepted Solutions
mete
Senior II

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.

View solution in original post

2 REPLIES 2

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
Up vote any posts that you find helpful, it shows what's working..
mete
Senior II

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.