home Home library_books Notes style Projects photos Photos Table Of Contents First check for Via SWD Via ST-Link Utility Related Articles The Taranis Q X7 is Real Turnigy Reaktor 250W Charger The Ultimate Micro Quadcopter Guide BlHeli ESC Upgrading and Configuration J-Link Getting Started Guide BeeRotor u130 UltraWhoop Micro Racer Unlocking STM32 Chips Nt 48

If you run into weird issues flashing your board, it might be because the board is locked.

First check for

  • Ground loops: Are you powering the board from a different power supply than the OpenOCD or J-Link programmer? Try to power the board from the programmer.

Via SWD

While pressing the boot button or shorting the boot pads, open OpenOCD, connect the SWD port and run:

  • For F4 and F7 devices, run:
> stm32f2x unlock 0
stm32f2x unlocked.
INFO: a reset or power cycle is required for the new settings to take effect.
> reset halt
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x1ff00c88 msp: 0x20003af8
  • For F3 devices, run:
> stm32f1x unlock 0
stm32f1x unlocked.
INFO: a reset or power cycle is required for the new settings to take effect.
> reset halt

Now try to debug or flash again.

Download and install: http://www.st.com/en/embedded-software/stsw-link004.html

Open the app, connect the board and reset the Option Bytes

Hope this was helpful. If so, feel free to checkout my YouTube channel, get updates when a new article is posted by following on Feedly and read the the other guides at nathan.vertile.com/blog