Skip to main content
Visitor II
August 2, 2022
Solved

How to use ST-Link V2 with STM32IDE

  • August 2, 2022
  • 3 replies
  • 17387 views

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

    This topic has been closed for replies.
    Best answer by KnarfB

    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

    3 replies

    KnarfBAnswer
    Super User
    August 2, 2022

    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

    Visitor II
    August 2, 2022

    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.

    Visitor II
    August 2, 2022

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

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

    TomminoAuthor
    Visitor II
    August 2, 2022

    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.

    Visitor II
    August 2, 2022

    Yes it will be the connection issue or firmware issues