How to Program STM32G031F6P* TSSOP20 package with ST-Link V2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-17 4:38 AM
Hi Engineers,
I am kinda new to the STM32 MCUs. I have a custom PCB powered with STM32G031F6P* TSSOP20 MCU. so on the PCB, I have a PIN "SWCLK", "SWDIO", GND, and VCC for programming. NRST is pulled HIGH. the strange thing is that BOOT-0 is on the same pin as SWCLK). and my ST-Link V2 can not connect to this PCB.
So my question is How do I program this chip? is this even possible to do?
I think I can program it with UART-1 and with the help of the BOOT-0 pin. But I do want to program this PCB with my current PCB design and configuration.
please help me with this issue!
I will attach the schematics
Best Regards
Jasur
- Labels:
-
ST-Link
-
STM32G0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-17 5:22 AM
You need NRST on programming pinheader.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-17 8:04 AM
In general, you need neither NRST nor BOOT0 pin for attaching debugger/programmer via SWD (the state of BOOT0 - in this case shared with SWD pin - is only sampled during reset, hence don't care later on). BUT: Probably you've already flashed something into the controller?! And probably this program touches the pin configuration of PA13/14/15 and consequently disables the SWD interface?!
In this case, the debugger must attach while NRST is pulled low ...
So it's a good idea to have NRST on the programming header, but with some care, it's not really necessary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-17 9:05 AM
@MM..1​ many thanks for your help, it actually helped and I also needed to remove pull up resistor.
But after all, I found a little solution after some investigation, I just configured the programmer to reset via software reset instead of hardware reset. you can see this in the attached photo.
