cancel
Showing results for 
Search instead for 
Did you mean: 

Still fighting to setup SWO trace on STM32H7

Gpeti
Senior II

Hello,

A few months ago I tried without success to setup ITM on a STM32H753I-EVAL2 board (and STM32CubeIDE). Now I'm trying again. There is a precise point I'm not sure about: the signal SWO is multiplexed on GPIO PB3, so I have to setup PB3 with alternate function SWO in my software. But is the SWO signal routed to the STLink ? Or in other terms: is it enough to plus the board through USB to the STLink to get the ITM outputs ?

Thank you

PS: I'm well aware of the following thread: https://community.st.com/s/feed/0D50X00009nNBBHSA4

29 REPLIES 29
Aleks
Associate III

Hi all in 2022.

I can't connect via STLink to custom board when enable SWO (STM32H725).

The core clock is 400Mhz.

I use CubeIDE to generate configuration code.

When SWO is disabled, debug run without any problem.

The mailfunction is still present in debug tool, or problem in configuration, etc?

Thank you.

0693W00000JON03QAH.png0693W00000JOMyMQAX.png 

For a start it's a different part using a different die. Is the board correct? What type of ST-LINK, with what firmware?

Do other aspects of the design function?

Does the NUCLEO-H723​ work in similar circumstances?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

IIRC, H72/3x has some change in ITM vs. older chips (a different frequency divisor or smth. like this). It was discussed here and known to be fixed in the latest ST tools. Do you have the latest? Maybe you use J-LINK? there's another bug mentioned here, specific to J-LINK and ITM.

Let's please move this discussion to a new thread.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Aleks
Associate III

Hi.

Thanks for responce.

My tool is

ST-LINK/V2 B2018 52, firmwire V2J39S7,

CUBE IDE Version: 1.8.0 Build: 11526_20211125_0815 (UTC),

STM32H725IGK6

I am sure that board is correct, it programmed via SWD, run, debug without any problem. Settings is

0693W00000JOWF2QAP.pngI have not board with STM32H725, but I'll try it later with Nucleo board with M7.

ST Link cannot connect to board until power on reset if enabled SWV. I try configure system clock to 550, 400, 200 MHz.

Yes of course. Could you please make it, or explain me how I can make it himself.

Aleks
Associate III

Thanks all. It seems the core of problem is missing connection on my PCB - pin PB3 is not routed. Hardware design is not implemented proper. So so, I watch about SWO in the ST youtube channel, try to use it, but video not touch hardware part. And today I am little bit unhappy.

AN4989:

The asynchronous mode (SWO) requires 1 extra pin and is available on all packages for STM32 based on Cortex-M3, -M4, and -M7.

Everything just started!

Muhammed Güler
Senior III

Muhammed, thank you.​

Coming back to this much later, but will address this with some context..

The F4 worked because it had more normative ITM/SWV implementation for a SINGLE core, not sure ARM had the multi-drop SWD implemented, and it certainly wasn't handled in KEIL's and ST's commercial releases of the era.

The issue here is with the original H743 implementations which was multi-core M7+M4, there were lots of iterations of the die before the multi-core was fully working as ARM+ST were working through teething issues. Notably I have X, Y, Z and V die parts. ST was probably first-silicon partner on this. During this time ST only publicly disclosed the M7 core, but everything internalyl was built to be multi-core, the SWD mechanics changed to facilitate this but Keil and other debuggers didn't support it with delivered drivers.

The ITM worked just fine on all the CM3, CM4, CM7 single core devices it was optioned on.

This CM4+CM7 combination has a significantly more complex implementation and funnel to facilitate connectivity to the individual cores. This I think now as documentation in the RM for the H743/745/753/755 parts.

Torsten Jaekel had done a lot of work on this based on his familiarity with SoC ARM designs, and related IP.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..