How do I enable serial wire debugging for STM32G030F6 in CubeMX?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-10 9:16 PM
The datasheet says PA13 (SWDIO) and PA14 (SWCLK) but there is no "Trace and Debug" category in CubeMX for STM32G030F6.
- Labels:
-
STM32CubeMX
-
STM32G0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-11-11 5: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-04-16 1:45 AM
Is this configuration true?
I have chosen connect under reset and I want to debug with StLink V2.
