<div dir="ltr">This guide is very helpful: <a href="https://nx3d.org/gnuk-st-link-v2/">https://nx3d.org/gnuk-st-link-v2/</a> In particular, pay attention to the photo at the bottom showing how to trigger the reset functionality.<div><br></div><div>I was having trouble getting the reset timing right, so I did something like this:</div><div><br></div><div>$ for i in `seq 1 500`; do stlink reset; stlink erase; stlink write [bin filename] 0x08000000; done</div><div><br></div><div>which gave me enough time to hold the CLK/IO jumpers in place with one hand and then drag another jumper across pins 7 and 8 on the STM32 chip to reset it. Note that I was using <a href="https://github.com/texane/stlink/">https://github.com/texane/stlink/</a> with the C8T6HACK modification at <a href="https://github.com/cabo/stlink">https://github.com/cabo/stlink</a>. The arguments in the bash command above are by memory and are likely incorrect, but you get the idea: wrap a reset/erase/write sequence in a big loop.</div><div><br></div><div>Finally, note that there are at least three different manufacturers of ST-Link v2 clones, and for some unknown reason they do not all use the same pinout for the four terminal points. You will need a continuity tester to establish the function of the four points, or if you are reckless, you can use trial and error and hope you figure it out without shorting out a component. For one of mine, the power terminals were the outer two points, and SWDIO was the middle one closer to the USB plug, and SWCLK was the other one in the middle.</div><div><br><div class="gmail_quote"><div dir="ltr">On Sat, Feb 10, 2018 at 3:48 PM Fox <<a href="mailto:f@0x52.eu">f@0x52.eu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have a St-link v2 STM32F101 from aliexpress (clone), and Im trying to<br>
flash it with another one.<br>
When I run tools/stlinkv2.py I get:<br>
ST-Link/V2 version info: 2 17 4<br>
Change ST-Link/V2 mode 0002 -> 0001<br>
Core does not halt, try API V2 halt.<br>
ValueError('Status of core is not halt.', 128)<br>
<br>
What am I doing wrong?<br>
<br>
-f0x<br>
<br>
<br>
_______________________________________________<br>
Gnuk-users mailing list<br>
<a href="mailto:Gnuk-users@gnupg.org" target="_blank">Gnuk-users@gnupg.org</a><br>
<a href="https://lists.gnupg.org/mailman/listinfo/gnuk-users" rel="noreferrer" target="_blank">https://lists.gnupg.org/mailman/listinfo/gnuk-users</a><br>
</blockquote></div></div></div>