2025-05-23 9:10 AM
Hello all :)
I am designing a board using the STM32WL33CCV6TR, and want to program/debug using the SWD interface. However, there are multiple pins the SWDIO and SWCLK can be mapped to using alternate functions. Usually with STM products, I have seen a footnote saying which pins the SWD interface is mapped to on boot. However, I cannot see this on the STM32WL33xx datasheet.
My question is which pins should I use as SWDIO and SWCLK so that I can program the chip out of the box (without having to mess around with the bootloader). And could I have found this information, as I am sure it is somewhere but cannot find it. I am guessing the PA2 and PA3 pins, but not really for any good reason...
Many thanks in advance!
Solved! Go to Solution.
2025-05-24 1:46 AM
Hello @angus123
As Said @TDK , this information should be available on the RM0511 specially on the paragraph 7.3.1:
During and just after reset, the alternate functions are not active and most of the 1/0 ports are configured in GPIO input pull-up mode except the SWD debug pins.
The debug pins are in AFO pull-up/pull-down after reset:
Best Regards.
STTwo-32
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.
2025-05-23 10:58 AM
Look at the default GPIO register settings in the Reference Manual.
2025-05-24 1:46 AM
Hello @angus123
As Said @TDK , this information should be available on the RM0511 specially on the paragraph 7.3.1:
During and just after reset, the alternate functions are not active and most of the 1/0 ports are configured in GPIO input pull-up mode except the SWD debug pins.
The debug pins are in AFO pull-up/pull-down after reset:
Best Regards.
STTwo-32
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.
2025-05-27 1:06 AM
2026-02-05 9:00 AM
@angus123 was smarter than I, I never pay attention that SWDIO and SWDCLK could be mapped elsewhere (never had issues on all STM32 I use for years) and when I designed my STM32WL3 board just saw SWDIO/SWCLK can be on PA12/PA13 so I routed to them. So I'm stuck and can't use board, I could be able to use UART and bootloader with BOOT0 but same "no luck" uart in my case is not routed to PA1/PA15
I think I'm stuck an no way to get out this error, if any option @STTwo-32 , @TDK would be appreciated, and I can give a try.
Anyway what's the use case moving away SWDIO SWDCLK on other pins than default, since doing this prevent any first flash ?
Thanks