While working on the STM32 Nucleo boards, the ST-Link programmer will not get detected. But you can able to see the Filesystem and three files will be present (FAIL.TXT, DETAILS.TXT, MBED.HTM). If you open the FAIL.TXT file, you can see this message “The interface firmware FAILED to reset/halt the target MCU“. In this post, we are going to see how to solve this.
Table of Contents
Fix: The interface firmware FAILED to reset/halt the target MCU
Sometime back when we were working on the STM32F767Zi Nucleo board, something went wrong. Due to that, the chip got locked and we were not able to connect it anymore. Accidentally, we opened the virtual disk which was created by the Nucleo board. In that disk, we saw the additional file called FAIL.TXT. In the file, it shows “The interface firmware FAILED to reset/halt the target MCU“. We tried the below methods which solved our problem.
Fix 1 – Updating / Reinstalling the ST-Link Driver
There are multiple ways we can update the ST-Link Driver.
You can follow any one of the methods.
STM32 ST-Link Utility
Download the ST-Link Utility (Windows only) from the ST website. Open the ST-Link Utility. Connect your Nucleo board. Click the ST-LINK and select the Firmware update. Refer to the below image.
Click the Device Connect option like the below image.
Keep the default settings and just click “Yes>>>>“. Refer to the below image.
Then you can see the “update is successful” popup window.
Then disconnect the board and connect it again. If the same error (The interface firmware FAILED to reset/halt the target MCU) is coming again, then try Fix 2.
STM32CubeProgrammer
Download STM32CubeProgrammer (all platforms). Connect the Nucleo board and open the STM32CubeProgrammer and Click the Firmware upgrade like the below image.
Make sure the ST-Link/v2-1 is available. Otherwise, click Refresh device list and select it. Then select the Open in Update mode. Finally, Click Upgrade. Refer to the below image.
Then you should see the Upgrade successful like the below image.
Then disconnect the board and connect it again. If the same error (The interface firmware FAILED to reset/halt the target MCU) is coming again, then try Fix 2.
Fix 2 – Connect Under Reset
Download STM32CubeProgrammer (all platforms). Connect the Nucleo board and open the STM32CubeProgrammer. Then if you refresh the device list, you can see your ST-Link Serial number. Then change the Mode to Under reset. Refer to the below image.
On the Nucleo board press and hold the RESET button (Don’t release it), while holding down the RESET button, click on the Connect button in the STM32CubeProgrammer. Then release the RESET button on the Nucleo board. Now the board should connect to the STM32CubeProgrammer. Finally, Erase the Full Chip.
If you still face this problem, then try to reducing the frequency one by one in the STM32CubeProgrmmer and try Fix 2 again. Refer to the below image.
Now you can able to download your binary file to the STM32. If you find some other way to solve this issue, please comment below.
Please read the STM32 Tutorials.
You can also read the below tutorials.
Embedded Software | Firmware | Linux Devic Deriver | RTOS
Hi, I am a tech blogger and an Embedded Engineer. I am always eager to learn and explore tech-related concepts. And also, I wanted to share my knowledge with everyone in a more straightforward way with easy practical examples. I strongly believe that learning by doing is more powerful than just learning by reading. I love to do experiments. If you want to help or support me on my journey, consider sharing my articles, or Buy me a Coffee! Thank you for reading my blog! Happy learning!