2021-11-10 09:16 PM
The datasheet says PA13 (SWDIO) and PA14 (SWCLK) but there is no "Trace and Debug" category in CubeMX for STM32G030F6.
2021-11-11 12:31 AM
SWDIO and SWCLK are enabled by hardware after reset, before the first CPU instruction is executed. CubeMX generates a software config that will override the pin functions soon after the CPU has started. Enabling SWD in software would be too late and could create hen/egg issues.
hth
KnarfB
2021-11-11 05:47 AM
If you want the pins listed in CubeMX, you set them in System Core -> SYS -> Serial Wire.
But this doesn't actually do anything since the pins are already in those modes after reset, as KnarfB says. But it will prevent you from assigning them to different functions.
2022-04-16 01:45 AM
Is this configuration true?
I have chosen connect under reset and I want to debug with StLink V2.