Skip to main content
Visitor II
June 21, 2017
Question

ST-Link/V2 and ST-Link/V2-1 issue

  • June 21, 2017
  • 4 replies
  • 2504 views
Posted on June 21, 2017 at 18:03

I have a custom board with STM32L051 on it. I am using an example from ST (I-Cube_lrwan). For some reason, once I load the firmware I cannot access the MCU anymore using ST-Link Utility and ST-Link/V2. It always throw 'Cannot connect to target'. But if I press the reset button before I press 'Connect' (in ST-Link Utility) and release the button right after I press 'Connect' , ST-Link/V2 can find my MCU.

But... when I use ST-Link/V2-1 from a Nucleo Board, it works perfectly. To me, its like ST-Link/V2-1 can reset the MCU properly where ST-Link/V2 cannot for some reason.

Can anyone suggest me what should I do if I want to use ST-Link/V2, in my case?

#st-link
    This topic has been closed for replies.

    4 replies

    Visitor II
    June 21, 2017
    Posted on June 21, 2017 at 22:50

    I would try to upgrade the ST-LINK firmware first. Use the build-in ST-Link capability to do it. Sometimes you will need to reconnect the usb cable to enter the programming mode.

    Technical Moderator
    June 22, 2017
    Posted on June 22, 2017 at 10:07

    Hi

    fahadmirza

    Do you select 'Connect under reset' mode in ST-Link Utility ?

    Does you firmware enter any low power mode or change SWD GPIO settings which can explain you can't reconnect with a normal system reset ?

    Olivier

    Visitor II
    June 22, 2017
    Posted on June 22, 2017 at 15:05

    Sometimes you need to connect to the device under reset.

    I am talking about upgrading the firmware on ST-LINK programmer (not the target MCU).

    Visitor II
    June 22, 2017
    Posted on June 22, 2017 at 18:34

    Hello

    Golab.Piotr

    ,

    It has the updated FW. At least that's what ST-Link is showing me (FW ver: V2.JS7 STM32+STM8 Debugger). Nucleo ST-Link FW version is V2.JM17 STM32 Debug+Mass storage

    Hi

    GALLIEN.Olivier

    ‌,

    Yes, the HW goes to low power mode (STOP mode) and change the SWDIO and SWCLK pins to analog. I did get the warning on ST-Link Utility ('Device is disconnected') right after I flash FW. For a long period of time I thought this was the problem and that's why I was using the external RESET button to flash my MCU.

    But... the ST-Link from Nucleo can access my MCU, with low-power and changed pin configuration. That's why I was wondering what are the differences between these two ST-Links

    N.B. My Nucleo board has ST-Link/V2-1 (that's what datasheet says) and the separate programmer is ST-Link/V2. And I am using 'Connect under reset'.

    Technical Moderator
    June 23, 2017
    Posted on June 23, 2017 at 10:23

    For a connect under reset the ST-LINK drive the NRST signal of the MCU. 

    On Standalone V2 probe the CN3.15 is driven and should be connected to NRST of your MCU.

    Is it the case ? 

    Visitor II
    June 23, 2017
    Posted on June 23, 2017 at 18:51

    I am not sure which pin is CN3.15. The ST-Link I have is shown below. RST is connected with my MCU's NRST.

    0690X00000607KiQAI.png

    I hope I am not having issues because it is not made by ST. Do you think that's a possibility?