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
33 REPLIES 33
_JJ_
Associate III

@mjuels, I think I have tried that too, but it's been quite a while, so I will try what you've suggested and share the outcome.

@Pavel A., this is not the first time a ST32H743 has been bricked for me, as I have mentioned, usually it's easy to recover from this situation using one of the suggestions or using the 'SEGGER STM32 Unlock' utility. In my case, this usually happens when trying to flash a FW using a SEGGER JLink device, and the RESET line is pulled by accident.

@AScha.3 yes, your feeling was right in my case, unfortunately. I believe in trying until the last hope dies. In my experience with STM32H743, it has been easy to recover in most cases. Will dig deeper in case I can find what exactly caused this, will share the knowledge if I find something concrete.

 

Thank you guys for coming up with different options and helping me in this matter, much appreciated.

 

PS: @AScha.3 & @Pavel A. in my case, ESD can not be the root cause, as I use an ESD (yes, grounded!) mat and wrist band while handling the device, the only thing making contact with the board was JTAG and UART cables.

BR
JJ

@_JJ_ 

So in this case, sure its not damaged by ESD , last chance :

Before you give up - maybe last action:  to reset the pcrop...whatever its now....

AScha3_0-1759742811557.png

 

Connect to cpu , maybe using hot-plug or hardware reset, whatever works better, or at all.

So try set : 

on L4xx: Uncheck PCROP_RDP + set RDP to level1 (protected) , 01  (or whatever, but NOT 0xCC !);

on H7xx: Check DMEP1 + 2 ,  + set RDP to level1 (protected) , 01  (or whatever, but NOT 0xCC !);

AScha3_3-1759743252116.png

 

then restart/ power cycle

and then : 

on L4xx: set Uncheck PCROP_RDP + RDP to 0xAA , to do regression;

on H7xx: Check DMEP1 + 2 , + RDP to 0xAA , to do regression;

L4:

AScha3_1-1759742811549.png

H7: 

AScha3_4-1759743843854.png

 

then apply....

AScha3_2-1759742811562.png

 

 

restart/ power cycle....and we know.

ed...for 'H7.

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

Yes, @AScha.3, you read my mind. I did read that in the manual, and definitely want to give it a try. Thanks for bringing it up.

BR
JJ
_JJ_
Associate III

Guess what fellas, following solution worked and STM32H743Xi is back in action again.

Run JLinkSTM32.exe to unlock the device.

The default location of this file is here: C:\Program Files\SEGGER\JLink_V796e.

This can be installed from here: https://www.segger.com/downloads/jlink/ and you need to use a jlink to do this.

 

PS: Funnily enough, I was using latest from the location, which was unable to unbrick it, but one of my collegue had an older version on his system and he tried and it worked like a charm!

 

Thank you guys for all your support! Much Appreciated!

BR
JJ