{"id":638,"date":"2024-08-26T14:27:11","date_gmt":"2024-08-26T12:27:11","guid":{"rendered":"https:\/\/chauquest.com\/?p=638"},"modified":"2024-08-26T14:27:12","modified_gmt":"2024-08-26T12:27:12","slug":"why-your-st-link-v2-reset-doesnt-work-and-how-to-fix-it","status":"publish","type":"post","link":"https:\/\/chauquest.com\/index.php\/article\/why-your-st-link-v2-reset-doesnt-work-and-how-to-fix-it\/","title":{"rendered":"Why Your ST-Link V2 Reset Doesn&#8217;t Work And How To Fix It"},"content":{"rendered":"<div class=\"wp-block-post-excerpt\"><p class=\"wp-block-post-excerpt__excerpt\">In this quick article, we&#8217;ll make some hardware modifications to an ST-Link V2 clone to enable software flashing using the reset pin. <\/p><\/div>\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>Why do we need to do this? In some projects, you&#8217;ll need to use the reset pin of the ST-Link V2. This pin is used to reset the chip just before flashing because the chip becomes available for flashing during this time. The issue is that, in ST-Link V2 clones, the reset pin is only configured for the reset behavior of STM8 chips. This means you won\u2019t be able to use this pin when flashing STM32 chips.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Alternatives<\/h3>\n\n\n\n<p>If you&#8217;re reading this, you might already have an ST-Link V2 clone with this hardware issue. The market is flooded with clones, and genuine ST products can be hard to find or out of stock. However, there\u2019s a solution: you could buy a Nucleo board, which is widely available.<\/p>\n\n\n\n<p>The Nucleo boards are ST&#8217;s development board family (similar to Arduino), and each Nucleo comes with an ST-Link V2 PCB that can be detached from the board. Depending on your country, purchasing a Nucleo board for your project might be about the same price as buying an ST-Link V2, and you get a development board with it!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Explanation<\/h2>\n\n\n\n<p>Let&#8217;s modify this chip !!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Material required<\/h3>\n\n\n\n<p>The hack is quite simple, but it still involves working with microelectronics, so you need to come prepared. In the future, I\u2019ll write an article explaining my workspace, but for now, here\u2019s a quick list of what you\u2019ll need:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Precision soldering iron (the TS-101 is great)<\/li>\n\n\n\n<li>Enameled copper wire<\/li>\n\n\n\n<li>Flux<\/li>\n\n\n\n<li>Fume extractor (important because flux fumes can be harmful)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">What are we trying to achieve<\/h3>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-accent-3-color\">You can skip this part if you&#8217;re not interested in explanation.<\/mark><\/p>\n\n\n\n<p>Let\u2019s take a look at the schematics of the Nucleo board to understand how to wire the ST-Link reset pin.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69f9f05085541&quot;}\" data-wp-interactive=\"core\/image\" class=\"wp-block-image aligncenter size-large is-resized wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"634\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/chauquest.com\/wp-content\/uploads\/2024\/07\/ST-Link_V2.1_Original_Schematics-1024x634.png\" alt=\"\" class=\"wp-image-642\" style=\"width:872px;height:auto\" srcset=\"https:\/\/chauquest.com\/wp-content\/uploads\/2024\/07\/ST-Link_V2.1_Original_Schematics-1024x634.png 1024w, https:\/\/chauquest.com\/wp-content\/uploads\/2024\/07\/ST-Link_V2.1_Original_Schematics-300x186.png 300w, https:\/\/chauquest.com\/wp-content\/uploads\/2024\/07\/ST-Link_V2.1_Original_Schematics-768x476.png 768w, https:\/\/chauquest.com\/wp-content\/uploads\/2024\/07\/ST-Link_V2.1_Original_Schematics.png 1529w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p>As you can see in the Nucleo board ST-Link V2 schematic (above), the NRST pin is connected to pin PB0. Therefore, we will need to solder this pin to the NRST output from the chip.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Soldering<\/h3>\n\n\n\n<p>If I&#8217;m not too lazy, I might upload a video of the whole process. For now, I\u2019ll just include pictures. The key is to use plenty of flux to make the process smoother.<\/p>\n\n\n\n<p>Once the tiny cable is soldered, you can secure everything with UV resin or a solder mask.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;69f9f05085c7b&quot;}\" data-wp-interactive=\"core\/image\" class=\"wp-block-image aligncenter size-full is-resized wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1008\" height=\"672\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/chauquest.com\/wp-content\/uploads\/2024\/08\/EYM_9453-2.jpg\" alt=\"\" class=\"wp-image-772\" style=\"width:765px;height:auto\" srcset=\"https:\/\/chauquest.com\/wp-content\/uploads\/2024\/08\/EYM_9453-2.jpg 1008w, https:\/\/chauquest.com\/wp-content\/uploads\/2024\/08\/EYM_9453-2-300x200.jpg 300w, https:\/\/chauquest.com\/wp-content\/uploads\/2024\/08\/EYM_9453-2-768x512.jpg 768w\" sizes=\"auto, (max-width: 1008px) 100vw, 1008px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on-async--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">The enameled cable is wired on the 6th wire from the right side (PB0)<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Test<\/h2>\n\n\n\n<p>You can now test the chip by enabling &#8216;Hardware reset.&#8217; You should see your microcontroller unit blinking due to the reset.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this quick article, we&#8217;ll make some hardware modifications to an ST-Link V2 clone to enable software flashing using the reset pin.<\/p>\n","protected":false},"author":1,"featured_media":773,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"footnotes":""},"categories":[1],"tags":[25,43,46,47],"class_list":["post-638","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-article","tag-electronic-board","tag-electronics","tag-mcu","tag-microcontroller"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/chauquest.com\/index.php\/wp-json\/wp\/v2\/posts\/638","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chauquest.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chauquest.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chauquest.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chauquest.com\/index.php\/wp-json\/wp\/v2\/comments?post=638"}],"version-history":[{"count":5,"href":"https:\/\/chauquest.com\/index.php\/wp-json\/wp\/v2\/posts\/638\/revisions"}],"predecessor-version":[{"id":840,"href":"https:\/\/chauquest.com\/index.php\/wp-json\/wp\/v2\/posts\/638\/revisions\/840"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chauquest.com\/index.php\/wp-json\/wp\/v2\/media\/773"}],"wp:attachment":[{"href":"https:\/\/chauquest.com\/index.php\/wp-json\/wp\/v2\/media?parent=638"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chauquest.com\/index.php\/wp-json\/wp\/v2\/categories?post=638"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chauquest.com\/index.php\/wp-json\/wp\/v2\/tags?post=638"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}