2024-11-03 8:56 PM
I get the following error when trying to debug an STM32H757 with SWO enabled.
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
Solved! Go to Solution.
2025-10-07 9:18 AM
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.
2025-10-08 1:25 AM
@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.
2025-10-09 2:13 AM
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.
2025-10-15 12:16 AM - edited 2025-10-15 6:11 AM
Hello @Imen.D ,
I check it's support SWV.
My clock seems good.
2025-10-15 1:33 AM - edited 2025-10-15 6:10 AM
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