cancel
Showing results for 
Search instead for 
Did you mean: 

How to use ST-Link V2 with STM32IDE

Tommino
Senior

Hello,

I would like to use a stlink V2 programmer purchased here 2548 Adafruit Industries LLC | Schede di sviluppo, kit, programmatori | DigiKey with a STM32 microcontroller(STM32G041) and STM32IDE.

I am using serial wire debug and connections should be fine (I wired just SWDIO and SWDCLK) but when I try to debug in STM32IDE something goes wrong because it seems that I need to update the programmer.

0693W00000QMipuQAD.png0693W00000QMiqxQAD.png 

Do you know how to solve this?

Even if I proceed without the update the error comes out

0693W00000QMipQQAT.png0693W00000QMioNQAT.pngThis is what happens if I try to update

0693W00000QMirMQAT.png

1 ACCEPTED SOLUTION

Accepted Solutions
KnarfB
Principal III

Although not an official ST product, these sticks usually work. The STLinkUpgrade tool should be able to identify th current firmware version and not say "Unknown". Try removing an re-inserting the stick while STLinkUpgrade is open and repeat. You could also try another tool: STM32CubeProgrammer for updating.

Updating works with no pins connected, SWD not needed. If you have SWDIO and SWDCLK connected, don't forget GND and keep in mind that 3.3V and 5V are usually outputs on those sticks in contrast to other ST-LINK devices.

hth

KnarfB

View solution in original post

5 REPLIES 5
KnarfB
Principal III

Although not an official ST product, these sticks usually work. The STLinkUpgrade tool should be able to identify th current firmware version and not say "Unknown". Try removing an re-inserting the stick while STLinkUpgrade is open and repeat. You could also try another tool: STM32CubeProgrammer for updating.

Updating works with no pins connected, SWD not needed. If you have SWDIO and SWDCLK connected, don't forget GND and keep in mind that 3.3V and 5V are usually outputs on those sticks in contrast to other ST-LINK devices.

hth

KnarfB

ASK
Associate II

Hi there,If you are using any of the debugger you have to update the firmware.Once if you updated that check the connection with the STMcu. VCC,SWDIO,SWDCLCK,GND,NRST pin should be connect properly.

ASK
Associate II

Connect the stlink debugger and try to do the firmware updation.

Open the upgrade STlink app --> device connect-> yes0693W00000QMk76QAD.png

Tommino
Senior

Hi all,

After several attempts it started working...honestly I don't know why it did not work at first. Maybe there was a problem in the connection.

Yes it will be the connection issue or firmware issues