Skip to main content
Associate III
April 28, 2025
Solved

More SWDIO/SWCLK bugs for STM32WL33 generated code

  • April 28, 2025
  • 1 reply
  • 291 views

I have found another bug in SWDIO code generation. I previously reported that no code is generated for SWCLK, but if both are relocated, SWDIO is also incorrect. The .Alternate uses a define of GPIO_AF1_SYS, which does not exist in stm32wl3x_hal_gpio_ex.h. The correct define should be GPIO_AF1_SWDIO, which is.

Generated code:

GPIO_InitStruct.Alternate = GPIO_AF1_SYS;

Correct to:

GPIO_InitStruct.Alternate = GPIO_AF1_SWDIO;

 

Best answer by STTwo-32

Hello @divmstr 

I've tested on my side (using the STM32CubeMX V6.14.1 and the STM32CubeIDE V1.18.1). And it seems to generate the correct macro "GPIO_AF1_SWDIO".

Could you please test it on your side (using the same versions I've used) and if it is not working, please add your .ioc file.

Best Regards.

STTwo-32

1 reply

STTwo-32
STTwo-32Best answer
Technical Moderator
April 28, 2025

Hello @divmstr 

I've tested on my side (using the STM32CubeMX V6.14.1 and the STM32CubeIDE V1.18.1). And it seems to generate the correct macro "GPIO_AF1_SWDIO".

Could you please test it on your side (using the same versions I've used) and if it is not working, please add your .ioc file.

Best Regards.

STTwo-32