This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Record trace on-chip with ETM on STM32H7 (Cortex M7)

Every now and then, as a side project, I try to setup the ETM on my STM32H7 to record the execution trace on-chip in circular buffer mode. The goal is really to record the trace ON CHIP and in some particular cases output this trace to the external world, but there is no specific tools like Lauterbach or ULink Pro involved. I don't need to filter the instructions, I want to record every instruction.

I've read plenty of ARM documentation (ETMv4 architecture spec, Coresight ref manual, amrV7 arch manual and of course STM32 ref manual) but still couldn't understand exactly how it works. In particular what is not clear is the relationship between the different components : ETM, ETF, DWT, Trace Funnel.

Here is the code I've got right now.

The status bit of ETF never raises (ETF FIFO apparently remains empty all the time).

Any idea ?

0