cancel
Showing results for 
Search instead for 
Did you mean: 

Accidentally flashed to wrong memory location, bricked device

t0mkee
Associate

Stm32F746G DISCO

My program was written to accidentally flash a value to be stored in the wrong location. the display would be unresponsive so I'd reboot it without issue. My software still worked normally, it's only when it encounters that line. How I think I bricked it was when I ran it though debugging, that's when I couldn't connect it via st link. It would say no stm device found.

The strange thing is, I was able to connect to it via a different usb port and unbrick the device. When I ran the debugger again I bricked it the second time. How could this be?

It tells me this might not necessarily be solely a hardware issue but something in conjunction with Windows.

 

I've spent all night uninstalling, reinstalling drivers, fiddling with boot0 pin and bootloader, using different settings with st programmer, etc. Under normal circumstances id just buy a new board but I'm not in a position to do so, I need this urgently fixed by this weekend 

1 REPLY 1
TDK
Super User

Hold BOOT0 high during reset to recover the device. Putting a jumper between BOOT0 and VDD, then tapping the reset button, will do it. Then you can connect normally with STM32CubeProgrammer to erase flash and recover the device.

If your program writes to flash, put a HAL_Delay(1000) after reset but before doing so to avoid the debugger failing to connect.

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