cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H757 SWO Debug Error

CWadd
Associate

I get the following error when trying to debug an STM32H757 with SWO enabled. 

CWadd_0-1730695812762.png

Failed to enable SWV configuration.

Failed to execute MI command:

-data-write-memory 0x5c003010 x 4 0x77

etc...

It would seem the debugger (ST-link v2) is not able to read the SWO and DBGMCU registers.

With the same debug configuration and code, SWO works on H747 hardware, so I'm wondering if there is an SWO difference between these two micros that is not obvious or documented.

Has anyone come across this issue before and has an idea of how to fix it?

Thanks

14 REPLIES 14

Hello,

Could you please try to increase the buffer size (for example to 20000000) under Window -> Preferences -> Serial Wire Viewer and see if the problem persist.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

@Imen.D ,

 

I added two 0 (200000000) and I still have the issue. Do you have any other ideas? It really complicates development not being able to activate the prints.
Screenshot 2025-10-08 at 10.14.26.png

Hello @MA4 

Please ensure that the STLINK version supports SWV. As mentioned in TN1235, some versions do not support SWV.
Additionally, there are issues with SWV caused by clock mismatches. Ensure that the CPU core clock configured in the debug settings matches the running core clock, including any PLL settings. Even small differences can prevent ITM output.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hello @Imen.D ,

I check it's support SWV.

My clock seems good.

MA4
Senior

ok I find the answer here : https://community.st.com/t5/stm32-mcus-products/stm32h7-swv-print-not-working-when-using-pll-to-generate/td-p/652721

 

The Core Clock settings must be the PLL1R value