Skip to main content
Associate II
September 13, 2025
Solved

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

  • September 13, 2025
  • 11 replies
  • 1638 views

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.

Best answer by _JJ_

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!

11 replies

_JJ_Author
Associate II
September 12, 2025

Merged threads.

Hello

I have been stuck with a bricked STM32H743XI. I was flashing a new FW and accidentally hit reset at the same time, and since then, I have been unable to talk to the MCU. I use Segger JLink for programming the device; it's a custom board built around STM32H743XI.

I have been stuck in the same issue in past, but back then, Segger Jlink STM32 Unlock utility came to the rescue, and the MCU was back on track. But this time, it seems not to be able to set option bytes, hence I can not flash the FW, and my board is unusable at this moment.

_JJ__0-1757693166489.png

Also, tried using JLink Commander, if it can erase MCU banks, but did not help either.

_JJ__1-1757693383098.png

As this didn't turn out to be quite helpful this time, I turned to different available options. First, tried using ST-vLink and ST Cube Programmer, but that too didn't work out well. I was able to connect to MCU but was not able to perform anything using the tool. Every single time I connected, a "Read Memory Error" popped up.

_JJ__2-1757693421241.png

Option byte using ST-vLink:

_JJ__3-1757693443557.png

In one of the forums, someone mentioned updating FW of ST-vLink to get over the issue, not sure how it would have helped, but was desperately looking for a solution, so I tried it, but it did not help either.

Tried ST Cube Programmer with Jlink as well, but same result. I guess no surprise there, if ST-vLink was not able to talk to ST MCU, how a 3rd party could...

_JJ__4-1757693646788.png

Option byte using Segger JLink:

_JJ__5-1757693669142.png

Any sort of help to resolve this issue would be really appreciated.

Thanks in adavance!

 

_JJ_Author
Associate II
September 15, 2025

This could be used as an extension to How to recover a bricked STM32H743XI?.

This is my original question and was marked as SPAM by the system, so I had to post another question(the linked question) to find a solution.

Not sure if I can mark this as a duplicate or something.

Andrew Neil
Super User
September 15, 2025

@_JJ_ wrote:

Not sure if I can mark this as a duplicate or something.


You can use 'Report Inappropriate Content':

AndrewNeil_0-1757930208369.png

Then choose 'Something else' as the reason:

AndrewNeil_2-1757930338819.png

and provide details - including a link to the other post:

AndrewNeil_3-1757930450944.png

A moderator will then be able to delete or merge, as appropriate.


A moderator has now merged the threads.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Super User
September 13, 2025
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
AScha.3
Super User
September 13, 2025

Hi,

so clear , fast and simple solution:

- put a new H743 on your board

- remove the reset   switch

(anyway you should never need it: if your program has a lot of problems/errors , you still in debug state and have the debug probe connected, that does reset, if needed; and if program is not crashing and "ready to use" , you need no hardware for reset at any time. )

"If you feel a post has answered your question, please click ""Accept as Solution""."
_JJ_Author
Associate II
September 15, 2025

@AScha.3, thanks for taking the time to respond, but it's not the solution I'm looking for.

I believe in solving problems, not replacing them. 

mƎALLEm
Technical Moderator
September 15, 2025

Hello,

Did you try the power down mode in CubeProgrammer?

mALLEm_0-1757929906380.png

 

"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_Author
Associate II
September 15, 2025

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

_JJ_Author
Associate II
September 15, 2025

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.

_JJ_Author
Associate II
September 15, 2025

@Jocelyn RICARD, any suggestions?

Jocelyn RICARD
ST Employee
September 16, 2025

Hello @_JJ_ ,

Could you please provide the output of command

STM32_Programmer_Cli.exe -c port=SWD mode=UR -ob displ

Thank you

Best regards

Jocelyn

 

_JJ_Author
Associate II
September 16, 2025

Hello @Jocelyn RICARD 

Thank you for looking into this issue.

Option Byte info you asked for...

_JJ__0-1758018297065.png

 

_JJ_Author
Associate II
September 17, 2025

Okay, so to understand the situation further, I tried flashing a known working firmware code using JLink and ST-vLink, and both worked well using CubeProgrammer, but the STM32H743XI still refused to boot.

At one point, I saw MCU fussing about something along the lines of "RAMCode execution failure" or "RAMCode can not execute"; I don't remember the exact wording. I think this was in the IAR Workbench when I tried to deploy a known working FW code in order to see if I could start debugging again.

Any thoughts on what could be wrong? @Jocelyn RICARD @mƎALLEm

mƎALLEm
Technical Moderator
September 17, 2025

As you are able to connect to the device and to flash it , I propose this stage to unzip the attached file that contains a working option bytes. Try to upload them to your device. Please read this article on how to do it: Restoring the STM32 option bytes to their factory settings using STM32CubeProgrammer / section: 1.2 Option bytes factory reset (import option)

"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_Author
Associate II
September 17, 2025

Thank you @mƎALLEm. I tried what you have suggested, CubeProgrammer has come back with the following error.

_JJ__1-1758110521779.png

As per the article used, 'Under Reset' Mode with 'Hardware Reset' to perform this operation.

_JJ_Author
Associate II
October 6, 2025

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

AScha.3
Super User
October 6, 2025

@_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_Author
Associate II
October 6, 2025

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.