cancel
Showing results for 
Search instead for 
Did you mean: 

SWD Reset doesn't seem to work on ST-link

Eymeric_Chauchat
Associate II

Hello,

I am developping a custom board on stm32l031f6. I got my hand on a ST-link v2 (from what I searched today it seems to be clone dongle...). My application is tight on pin so I use SWclk as a GPIO pin. Before making this pin definition, I could freely  flash from STMCubeIDE. Now that I changed the definition for GPIO pin, when I flash, I kind of brick my MCU (expected).I thought that I would have been able to leverage the use of RST pin to automatically boot again my MCU, but even with trying "connect under reset", didn't do nothing.

Only way, I found is to manually push RESET, go on STMCubeProgrammer and full erase the chip, and after I can go back to STMCubeIDE to flash my chip. It is way too long in my workflow and I think a better solution exist since we only talk about pulling down a RST pin.

My hardware reset setup is as follow :

- NRST pin is tied to a button to ground (manual)

- NRST pin is tied to a header pin that is directly linked to ST-Link V2

- No pull up, pull down, cap...

 

So I have two questions, is my software/hardware setup correct (connect under reset is enough to automatically boot thanks to RST pin), is it normal that my MCU doesn't reset when I try to go on debug with connect under reset, active and Hardware reset on STMCubeProgrammer ? (I would have thought that even if it doesn't flash program at least my code would restart (I have visual clue when I manual reset))

Can my ST-link v2 dongle just broken ?? (It updated without issue, and since it has ST logo, I though it was legit...)

Eymeric_Chauchat_0-1718295206348.png

 

11 REPLIES 11

RST on "Clone" is for STM8 and i mean isnt unlegit. Simply is peace of hw , that somebody provide. Not good not bad.


@Eymeric_Chauchat wrote:

I could buy a Nucleo board (for example the one for L0 series) and it embed a (kind of) detachable St-link in it.

Am I right ? If so for nearly the same price of clone, I could have a test board AND St link


That's correct.

For educational purposes, I'd say that's the best option - having the ST-Link integrated removes a whole lot of possibilities for confusion & errors by students!

Note that the Nucleo's on-board ST-Link can be used to program & debug external targets without having to detach it