cancel
Showing results for 
Search instead for 
Did you mean: 

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

Fahad Mirza
Associate II
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
13 REPLIES 13
Posted on June 27, 2017 at 17:26

Thanks Clive for the suggestion. Yes, that's one way to do it. I was just wondering how come the Nucleo ST-Link can still access my mcu while in Low Power Mode, when the other can't.

Posted on June 27, 2017 at 17:28

Thanks Olivier. Yes, that's what I am doing now. I detached the ST-Link from the Nucleo

Posted on June 27, 2017 at 17:29

Thanks David. I will try that and will get back to you.

Posted on June 27, 2017 at 20:52

The V2-1 might be doing something with DBGMCU to stop it sleeping, but honestly I don't know, and don't care too much. Disconnecting when power is removed from the scan-chain is prevalent among JTAG pods, pretty sure I'm seeing the LRWAN-DISCO doing exactly that, which is why I suggested the modification above. There are flags stopping WFI doing the power down, and it can be avoided in debug builds

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..