cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX2, allow to use SWD without SWO

av500
Associate II

when you enable SWD in CubeMX2 it automatically blocks the SWO pin as well (tested using C531FBP6), but I only need SWCLK / SWDIO to debug. please add a way to disable the use of SWO.

13 REPLIES 13
Oussama_TROUDI
ST Employee

Hello @av500 and welcome to the ST community,

I’m currently checking this with the dev team and will get back to you as soon as I have an update.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Karl Yamashita
Principal

You can right click and reset the pin state so it's no longer SWO.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool
CANableV3 Open Source

sorry, but I cannot, as you can see, "Reset Pin State" is disabled

Screenshot_20260326_221746.png 

Must be a bug on your selected part. I was able to do it on the C562RE

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool
CANableV3 Open Source

also disabled in my CubeMX2 (v1.0.0 / Linux)

Screenshot_20260326_222601.png

Hi @av500  @Karl Yamashita 

Regarding the "Reset Pin State" option is available and clickable only for reserved pins and pins configured as GPIO.
It is greyed out (disabled) for pins configured with functional (non‑GPIO) signals such as SWD, I2C or SPI.... 


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Yes, I understand that, still SWD config should allow to not use/block SWO.

going even further, CubeMX(2) should allow to override any assigned pin, e.g. in the past I have used I2S TX with only the SDO (MOSI) line, not using/muxing CLK or WS, but CubeMX does not allow such a setup...

I can reset the SWO, at least on the C562RE

Screenshot 2026-03-26 150136.png

SWO pin is reset while SWDCLK and SWDIO are still enabled.

Screenshot 2026-03-26 151454.png

I can also reset SWDIO and SWCLK

Screenshot 2026-03-26 152220.png

Screenshot 2026-03-26 152247.png

 

As for @av500, he mentions C531FBP6, but I can't find that part. But I tried with the C531CBT6 and yes the Reset Pin State is disabled.

Screenshot 2026-03-26 151757.png

EDIT: I actually found the C531FB. I didn't pay attention to the multiple page selection. 

But yeah, that part you can't reset the SWO pin.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool
CANableV3 Open Source

Karl Yamashita
Principal

It looks like if I select as a Board project with the C562RE, i am able to reset the SWD pins.

If i create as an MCU project with C562RE, I can't reset the pins.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool
CANableV3 Open Source