cancel
Showing results for 
Search instead for 
Did you mean: 

Debug with SWO and SWV in STM32CubeIDE 1.3.0

PHlin.1
Associate III

Hello,

Is there any guide or manual how to use SWO and SWV in STM32CubeIDE? I found many discussions about this topic, but most of them were outdated or newer resolved.

I believe that one part is to enabled SWV in debug settings, set the CPU and SWO clock (160Mhz and 2000kHz in my case) and in the second step during the debug session I have to enable ITM Stimulus port 0 in SWV configuration and start it with Start trace button in SWV window, is that all?

This somehow worked in STM32CubeIDE 1.2.0 even that printf using ITM_SendChar(ch) didn't work form me, but when I click on Start trace button in SWV window in 1.3.0 during debug session, I'm getting "Target is not responding, retrying..." error messages and whole debug session shuts down. This wasn't happening in previous version.

Could somebody please help me with this? I already spend quite a lot of time without any luck.

Thanks,

Petr

14 REPLIES 14

See this. V1.3.0 looks broken, go back to 1.2.

-- pa

MEdgerton
Senior

Has anyone got the SWV console working reliably?

I read somewhere that someone updated the STlink-v3 firmware and had an option not to include mass storage device which worked. But I cannot find that option in the utility either in CubeIDE or the stand alone upgrade utility(which updates to a newer version than cubeIDE). Does anyone know where this firmware is to try?

Is anyone from ST reading this and can comment on when we my see a fix?

Or am I just going to have to get a UART hooked up and loose some pins for a basic debug output?

Thanks,

Mark

It looks like one has to dig into OpenOCD internals to get things working reliably. But I never had time for this.

-- pa

This seems to only affect the H7 as all the other Nucleo board I have are fine. Or is it the STLink-V3 that is affected?

As you says its the OpenOCD is there a forum somewhere else this is being discussed as a general problem.

I thought it may just be an issue with some ST H7 devices/boards?

VSánc.1
Associate

I recommend you verify the frequency of the interface is the same as the HCLK