Skip to main content
Visitor II
April 16, 2025
Question

ST-LINK: "Failed to execute MI command" & "Error in initializing ST-LINK device

  • April 16, 2025
  • 3 replies
  • 962 views

We are using STM32CubeIDE to configure the STM32 controller. Previously, flashing the code to the board was working fine. Recently, while trying to debug, the IDE started showing this error: "Failed to execute MI command""Error in initializing ST-LINK device" We tried upgrading the ST-LINK driver, and the controller responded to the host. In STM32 ST-LINK Utility, we could select the External Loader, which means the connection seemed okay.However, when we tried to erase the flash using ST-LINK Utility, we got:
"Target not connected" We tried many solutions in STM32CubeIDE, but we could not identify the root cause. Could anyone please help us understand what might be going wrong?

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    April 16, 2025

    Welcome @Naveen12, to the community!

    Please add photos of the front and back of your ST-LINK here.

    Regards
    /Peter

    Naveen12Author
    Visitor II
    April 16, 2025

    image.pngimage (1).pngScreenshot 2025-04-16 181820.png

    Technical Moderator
    April 16, 2025

    Hello,

    Please use STM32Cubeprogrammer, ST-Link utility is deprecated:

    STM32CubeProgrammer 

    The error message "No device found on target" indicates that the STM32H7 is probably not powered, or is in a state where it can't be accessed.

    Please download the User Manual , and check the jumpers and solder bridges configuration.

     

    Super User
    April 16, 2025

    @Naveen12 wrote:

     Recently, while trying to debug, the IDE started showing this error: 


    So what did you change immediately before that started happening?