cancel
Showing results for 
Search instead for 
Did you mean: 

h503 nucleo 64 can't upload code - Failed to execute MI command

KDT85
Associate II

Hi, 

Thew board was working fine until i tried to get serial working over virtual COM. I'm not sure what ive done but now im receiving this message

Error in final launch sequence: Failed to execute MI command: load C:\\Users\\Ki\\STM32CubeIDE\\workspace_H503\\blink\\Debug\\blink.elf Error message from debugger back end: Error finishing flash operation

Is there a way to reset the board? or have I bricked it. 

It still talks to the link utility in the IDE and says it needed an update which completed successfully.

Sorry Im a bit lost and would appreciate some guidance. 

I can provide more info if needed

Thanks in advance 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Yes.

You see: connects and cpu working fine.

So: st-link ok, cpu ok.

Now check IDE debug settings : also ->

AScha3_0-1714224582264.png

If still not working here in IDE, you wrote some "strange" things to the H503, so try then:

connect with CubeProgrammer again , erase full chip - but be careful, not to do any bad action with the readout protection ! (read in rm first...you can "kill" the chip here - responding never anymore . warning ! )

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

5 REPLIES 5
AScha.3
Chief III

Hi,

Try with CubeProgrammer , set mode "under reset" , reset "hardware reset" , connect ;

then show , what it tells (screenshot).

If you feel a post has answered your question, please click "Accept as Solution".
KDT85
Associate II

KDT85_0-1714223662901.png

14:10:52 : STM32CubeProgrammer API v2.16.0 | Windows-64Bits
14:11:41 : UR connection mode is defined with the HWrst reset mode
14:11:41 : ST-LINK SN : 0024004C3232511639353236
14:11:41 : ST-LINK FW : V3J14M5
14:11:41 : Board : NUCLEO-H503RB
14:11:41 : Voltage : 3.30V
14:11:41 : Warning: Connection to AP 0 requested and failed, Connection established with AP 1
14:11:41 : SWD freq : 8000 KHz
14:11:41 : Connect mode: Under Reset
14:11:41 : Reset mode : Hardware reset
14:11:41 : Device ID : 0x474
14:11:41 : Revision ID : Rev Y
14:11:41 : Debug in Low Power mode enabled.
14:11:41 : SFSP Version: v1.4.0
14:11:41 : UPLOADING OPTION BYTES DATA ...
14:11:41 : Bank : 0x00
14:11:41 : Address : 0x40022050
14:11:41 : Size : 112 Bytes
14:11:41 : Bank : 0x01
14:11:41 : Address : 0x40022070
14:11:41 : Size : 8 Bytes
14:11:41 : Bank : 0x02
14:11:41 : Address : 0x40022080
14:11:41 : Size : 8 Bytes
14:11:41 : Bank : 0x03
14:11:41 : Address : 0x400220e8
14:11:41 : Size : 8 Bytes
14:11:41 : Bank : 0x04
14:11:41 : Address : 0x400221e8
14:11:41 : Size : 8 Bytes
14:11:41 : Bank : 0x05
14:11:41 : Address : 0x40022090
14:11:41 : Size : 8 Bytes
14:11:41 : Bank : 0x06
14:11:41 : Address : 0x400220f8
14:11:41 : Size : 8 Bytes
14:11:41 : Bank : 0x07
14:11:41 : Address : 0x400221f8
14:11:41 : Size : 8 Bytes
14:11:41 : UPLOADING ...
14:11:41 : Size : 1024 Bytes
14:11:41 : Address : 0x8000000
14:11:41 : Read progress:
14:11:41 : Data read successfully
14:11:41 : Time elapsed during the read operation is: 00:00:00.006

Thanks so much for the reply

Is this helpful?

Yes.

You see: connects and cpu working fine.

So: st-link ok, cpu ok.

Now check IDE debug settings : also ->

AScha3_0-1714224582264.png

If still not working here in IDE, you wrote some "strange" things to the H503, so try then:

connect with CubeProgrammer again , erase full chip - but be careful, not to do any bad action with the readout protection ! (read in rm first...you can "kill" the chip here - responding never anymore . warning ! )

If you feel a post has answered your question, please click "Accept as Solution".
KDT85
Associate II

KDT85_0-1714226009379.png

I have made the changes and I'm getting a different error now. 

Frequency was auto and reset behavior was connect under reset

KDT85
Associate II

KDT85_1-1714227448990.png

I've been playing with these settings and this combination seems to work! 

Thank you so much :)