Skip to main content
Visitor II
September 3, 2024
Solved

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

  • September 3, 2024
  • 2 replies
  • 1792 views

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.

 

    This topic has been closed for replies.
    Best answer by mƎALLEm

    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."

    2 replies

    Super User
    September 3, 2024

    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

     

    Technical Moderator
    September 3, 2024

    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.

    Super User
    September 3, 2024

    @mƎALLEm 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?

    Isy777Author
    Visitor II
    September 3, 2024

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