2025-04-16 5:34 AM - last edited on 2025-04-16 5:42 AM by Andrew Neil
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?
2025-04-16 5:44 AM
Welcome @Naveen12, to the community!
Please add photos of the front and back of your ST-LINK here.
Regards
/Peter
2025-04-16 5:47 AM
Welcome to the forum.
You need to supply some more details - see: How to write your question to maximize your chances to find a solution.
Have you seen:
https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/ta-p/49693
Are you using a genuine ST-Link:
Note that the old ST-Link Utility is long obsolete - have you tried CubeProgrammer ?
2025-04-16 5:51 AM
2025-04-16 6:43 AM
@Naveen12 wrote:Recently, while trying to debug, the IDE started showing this error:
So what did you change immediately before that started happening?
2025-04-16 6:43 AM - edited 2025-04-16 6:43 AM
Hello,
Please use STM32Cubeprogrammer, ST-Link utility is deprecated:
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.