cancel
Showing results for 
Search instead for 
Did you mean: 

How to recover a bricked Flash STM32H743XI after accidentally pulled the RESET line while flashing a FW

_JJ_
Associate III

Hello Community

For some reason, my post from yesterday did not go through and was marked as spam. I'm not interested in moaning about it right now, as I have managed to brick my custom board, designed with STM32H743XI and would be more interested in finding a way to unbrick it.

Before jumping to any conclusion, please read the post as it contains crucial info and things I have already tried, which you would like to suggest.

Some info about my setup, as mentioned earlier, it's a custom board with BOOT0 and RESET pins exposed using a switch, and there is a JTAG interface for debugging purposes, along with a SEGGER JLink. The way I managed to brick is that I accidentally pulled the RESET line while flashing a FW using Jlink, and since then, it seems memory is in locked mode, and neither Jlink nor ST-vLink is helpful in the rescue mission.

Things I have already tried and did not work... maybe I am missing something.

  1. I have been in this situation before, and was able to recover from it using JLInk STM32 Unlock tool, but surprisingly, this time, that too is unable to reset the Option Bytes and fails to recover.
  2. Tried using the JLink Commander tool too, which was also not able to erase the memory, returned error code -5.
  3. Tried to use STM32CubeProgrammer with Jlink, and tried to gain control of the MCU in reset mode, and tried to mass erase and reset option bytes, but it did not work.
  4. Tried to use STM32CubeProgrammer with Jlink, and tried to gain control of the MCU in reset mode using DFU by pulling BOOT0, then RESET and releasing RESET while still holding BOOT0 high and later releasing it, but that too failed to mass erase and reset option bytes.
  5. Steps 3 and 4 were also repeated using ST-vLink, but failed in the same manner.

Right now, it feels like I am running out of options to recover from this situation. If someone can point me to any other solution or point out a mistake in what I have tried out so far, I would really appreciate the help!

 

PS: My other post on the same point, which is marked down as spam, had all the screenshots for reference to what I have tried so far, and I will try to upload them here if I can.

BR
JJ
17 REPLIES 17

@AScha.3 all fair points. But following your suggestions is not always possible. Thank you for showing interest in solving the problem though.

BR
JJ

@_JJ_  

- come on :

AScha3_0-1757932560898.png

-> target has no power (or vdd connection to st-link missing) = this cannot work.

connect vdd...and/or power target.

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

@AScha.3 thank you, but this was a reference snapshot (ST-vLink was in disconnect state, so 0V otherwise 3.14V is reported) for @mƎALLEm to confirm if I had the correct configuration set for connecting over 'Power Down' configuration.

BR
JJ

Ok try with:

Mode: Power down mode

Reset mode: Hardware reset

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.

@mƎALLEm yes that did work...

  1. Set up CubeProgrammer with the suggested config.
  2. Did 'Full Chip Erase', which was successful
  3. Used SEGGER JLink to cross-check if it worked, and it seems to have worked.

What should be my next step? Do you think I should try flashing a working/known FW file and see if that boots the MCU?

BR
JJ

When you did 'Full Chip Erase', did you see 0xFFFFF in all the flash content?


What should be my next step? Do you think I should try flashing a working/known FW file and see if that boots the MCU?


If you see see 0xFFFFF in all the flash content, yes go ahead.

If the application is running after flashing it, please accept as solution my previous comment.

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.
_JJ_
Associate III

@mƎALLEm yes, the flash content was all 0xFFFF.

But I think the system is still bricked.

_JJ__0-1757935329325.png

PS: This is using IAR & JLink. I could not flash.

BR
JJ
_JJ_
Associate III

I was going through the very first response by @Andrew Neil and found https://community.st.com/t5/stm32-mcus-security/unable-to-erase-stm32h743-device-how-to-recover-the-device/m-p/115706 with no accepted answer.

which is the same problem I am currently facing.

BR
JJ