cembeddedstm32stm32cubeidestm32cubemx

The interface firmware FAILED to reset/halt the target MCU


I want to connect my simple STM32F401RET6 Nucleo to a computer for firmware updates via the USB port, not through STLINK pins and SWD. When I try to connect the USB cable, I receive this error message: (https://i.sstatic.net/XWpJk.png)

Before this board all of the board were stitched. When I try to start the debugger in Cubeide, I get this message:

Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 1
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled
        InitWhile                  : Enabled

Target no device found

Error in initializing ST-LINK device.
Reason: No device found on target.

Attempting to debugging in CubeProg despite the above gives me a message that my STLINK not connected to the target: (https://i.sstatic.net/WR5Tw.png)

This how the board looks like now, maybe this is hardware problem? Or do I need to switch cable USB to firmware nucleo? (https://i.sstatic.net/WZjK8.jpg)

I started my test project with CubeMX and it gives the same message. I put all of the jumpers and tried to put a jumper on BOOT0/BOOT1. Debug mode puts on both OpenOCD and GDBServer, nothing is working.


Solution

  • The ST-Link has different connection modes to cope with different hardware implementations and debug scenarios. You should change the mode to determine what works. Probably "Connect under RESET".

    Also it will fail to connect if RDP has been enabled.

    You might try to connect with the stand-alone STM32CubeProgrammer, it provides more comprehensive diagnostic information which may help.