2026-02-12 10:44 PM
I am using the B-G431B-ESC1 board, which connects to my laptop via a micro-USB to USB-A cable. After a failed connection attempt, the board is no longer detected by STM32CubeProgrammer. Additionally, a file named "File.txt" is created on the MCU after the failed attempt.
The contents of the file are:
"The interface firmware FAILED to reset/halt the target MCU."
This file appears to be causing issues with the connection to STM32CubeProgrammer.
Could anyone please help me resolve this issue?
2026-02-12 10:49 PM
it is FAIL.TXT not File.txt
2026-02-13 12:11 AM
You can try flashing with CubeIde.
2026-02-13 2:01 AM
Same issue with STM32CubeIDE.
2026-02-13 2:31 AM
Hello @Ankitesh,
Has the board been modified around SWD signal path?
Refer to the STM32CubeProgrammer user manual and try using Connect under reset mode.
2026-02-16 9:26 PM
1. Has the board been modified around SWD signal path?
Ans: No
2. Refer to the STM32CubeProgrammer user manual and try using Connect under reset mode.
Ans: I've used this method but not working. I've used different combinations of "Mode" as well as "Reset Mode" as shown below in attached pic with different frequency, But still I'm getting same error?
2026-02-16 10:20 PM
This same issue occurs around 4 months ago, but that time somehow "FAIL.TXT" file removed from MCU, then the STM32CubeIDE as well as STM32CubeProgrammer starts connecting with MCU.
This same issue occurs this time, but now considering previous situation, it is clear that we have to remove that "FAIL.TXT" file.
Note: This is my understanding right now, If I'm not doing right approach then Please tell me.
2026-02-17 1:45 AM
Hello @Ankitesh,
Did you try using another PC, USB cable, or B-G431B-ESC1 board?
Did you verify the SWD and clock signals on J4 of the B-G431B-ESC1 board?
2026-02-17 1:52 AM
This usually happens when the ST-LINK can’t reset or halt the MCU after a failed flash/debug attempt — the File.txt is just a log, not the actual problem.
Try this:
In STM32CubeProgrammer, select “Connect Under Reset”
Lower the SWD frequency (e.g., 100 kHz)
Fully power cycle the board and try again
Also check for ST-LINK firmware updates
In most cases, connecting under reset with a lower SWD speed fixes it.
2026-02-18 2:52 AM
1. Did you try using another PC, USB cable, or B-G431B-ESC1 board? - Yes, but same result.
2. Did you verify the SWD and clock signals on J4 of the B-G431B-ESC1 board? - Yes, but same result.