Electrical – stm32f051 Overwritten reserved

gdbopenocdstm32

I think I may have overwritten the reserved bits when messing with GPIO on my board.
Now when I try to connect with OpenOCD it gives an error.

Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v24 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.260948
Error: init mode failed (unable to connect to the target)
in procedure 'init' 
in procedure 'ocd_bouncer'

Is there any way to erase the memory in flash without being able to connect to the board, or Have I bricked my board.

Best Answer

You can reset the option bytes of a STM32 device to their factory settings with SEGGER's J-Link Unlock STM32 tool. It is included in some SDKs but you can download it here :

https://www.segger.com/downloads/jlink

You can also use J-Flash that is also included in J-Link to do a full erase. Check this link too, it might help.

Related Topic