I had a similar error message reported in the FAIL.TXT
file located on the board’s virtual disk after I accidentally interrupted an ongoing program download to the chip:
The interface firmware FAILED to initialize the target MCU
.
In addition, the chip got locked (I was not able to connect to it anymore) as reported above by David.
Performing the following steps fixed the issue:
- Install the
STM32CubeProgrammer
to your host PC. - Launch the
STM32CubeProgrammer
and in theST-LINK configuration
window click on the refresh Serial number button (see in the picture below). - In the
ST-LINK configuration
window reduce theFrequency
from4000
to1800
(see in the picture below). - In the
ST-LINK configuration
window change theMode
toUnder reset
(see in the picture below).
-
On the target board push the RESET button and, while holding down the RESET button, click on the
Connect
button in theSTM32CubeProgrammer
(see in the picture above). -
Release the RESET button on the target board.
-
Once the chip is connected, initialize a
Full chip erase
by clicking on the button. -
Check/modify the
Option bytes
as needed by clicking on the button. -
Open the file containing the binary code and then download it to the chip.