2021-02-24 10:42 PM
I am working on a project and plan to use STM32g030c6t6 as micro-controller. I am using STLINK v3 set as debugger for uploading the program. I am unaware of how will be the connection of the debugger and controller as I want to communicate through UART
2021-02-24 11:54 PM
The same pin cannot be used simultaneously for uart and debug.
But, the data sheet has a footnote on some pins: "Upon reset, these pins are configured as SW debug alternate functions...".
Meaning: The UART pin function is done by your firmware, *after* reset. In the short time before that, SWD is available, so you can still connect to the MCU under reset, e.g. for flashing or loading a special debug firmware etc... Note that this use of SWD depends also on your board design (pull-ups/downs,...), so read the data sheet carefully and test on a prototype.
If you can avoid that dual pin use: I would avoid it. Look for alternate UART pin function mappings.
hth
KnarfB
2021-02-25 02:06 AM
Is there any other option to communicate other than jtag?
2021-02-25 03:02 AM
I recommend going through "STM32 microcontroller debug toolbox" document.