2021-07-15 03:26 AM
We are facing this error when entering every commands. Second attempt of the command is passed while in first attempt we get ST Link error.
Please find the commands executed and error faced:
C:\Users\irgpsj>"C:/Program Files (x86)/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI" -c port=SWD --erase all
-------------------------------------------------------------------
STM32CubeProgrammer v2.4.0
-------------------------------------------------------------------
ST-LINK SN : 34FF6D064D4E353842310643
ST-LINK FW : V2J31S7
Voltage : 3.20V
Error: ST-LINK error (DEV_TARGET_CMD_ERR)
C:\Users\irgpsj>"C:/Program Files (x86)/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI" -c port=SWD --erase all
-------------------------------------------------------------------
STM32CubeProgrammer v2.4.0
-------------------------------------------------------------------
ST-LINK SN : 34FF6D064D4E353842310643
ST-LINK FW : V2J31S7
Voltage : 3.20V
SWD freq : 4000 KHz
Connect mode: Normal
Reset mode : Software reset
Device ID : 0x450
Device name : STM32H7xx
Flash size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M7
Mass erase ...
Mass erase successfully achieved
C:\Users\irgpsj>"C:/Program Files (x86)/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/STM32_Programmer_CLI" -c port=SWD --erase all
-------------------------------------------------------------------
STM32CubeProgrammer v2.4.0
-------------------------------------------------------------------
ST-LINK SN : 34FF6D064D4E353842310643
ST-LINK FW : V2J31S7
Voltage : 3.20V
Error: ST-LINK error (DEV_TARGET_CMD_ERR)
2021-07-16 03:00 AM
Hi PS.7 ,
Can you please try ton connect under reset and with mower frequency?
Also I recommend you to switch to last CubeRogrammer version 2.7.O, available inst.com, please uninstall the old one or install it in new folder.
Hope this helps you.
Houda
2021-07-20 07:05 AM
Hi Houda, Thank you for the response, I tried the steps you shared yet facing the same issue.
2021-12-08 01:09 AM
Hello,
thank you for sharing. I could not connect my device to the STM32CubeProgrammer and only got the following error message:
Error: ST-LINK error (DEV_TARGET_CMD_ERR)
It seems that in the past it was possible to erase the chip without establishing a connection (ST-Link Utility). However, when using the STM32CubeProgrammer, a connection is required to be able to erase it.
The solution is to use the client and erase the chip while reset button is pressed. Here's how I proceed: