cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Connection to target must be established before performing the erase command.

Isy777
Associate

Hi, 

I have an issue on STM32H7B3I-DK, I am not able to flash code, I atleast want to perform full erase, but I am getting " Error: Connection to target must be established before performing the erase command." error.

Isy777_0-1725376402941.png

Fig: STM32CubeProgrammer.

Isy777_1-1725376472561.png

Fig: Trying to erase the board. But still getting the above error.

Anything else can I do on this board.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Ok what about my second point? :

"If not, could be something related to a wrong power configuration you set previously in your application. The board is wired in SMPS by default. So if you set LDO in your application you lose the connection.

Please see this thread."

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

5 REPLIES 5
Andrew Neil
Evangelist III

It's telling you that it can't connect to the Target; therefore it won't be able to do anything to the Target until that is fixed!

AndrewNeil_0-1725377012258.png

 

SofLit
ST Employee

Hello,

Are you sure you are using a data cable and not a charging cable?

If not, could be something related to a wrong power configuration you set previously in your application. The board is wired in SMPS by default. So if you set LDO in your application you lose the connection.

Please see this thread.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

@SofLit wrote:

Are you sure you are using a data cable and not a charging cable?


It seems to be indicating that the connection to the ST-Link is OK:

AndrewNeil_0-1725377413248.png

So the cable must be good?

Yeah, Cable is good. Something must be done at board's end. 

Ok what about my second point? :

"If not, could be something related to a wrong power configuration you set previously in your application. The board is wired in SMPS by default. So if you set LDO in your application you lose the connection.

Please see this thread."

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.