Skip to main content
Visitor II
November 17, 2022
Question

How to Program STM32G031F6P* TSSOP20 package with ST-Link V2

  • November 17, 2022
  • 3 replies
  • 1711 views

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

0693W00000WIfPBQA1.png

    This topic has been closed for replies.

    3 replies

    Graduate II
    November 17, 2022

    You need NRST on programming pinheader.

    Explorer II
    November 17, 2022

    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.

    Visitor II
    November 17, 2022

    @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.

    0693W00000WIhbYQAT.png