Writing Option Bytes on STM32F1
Hello,
Im developing an program that controls an ST-Link to flash an STM32F1. The program needs to be able to remove RDP on the MCU its trying to flash.
Im doing the following steps:
1) Unlocking Flash - confirmed working (registers confirm)
2) Unlocking option bytes - confirmed working (registers confirm)
3) Erasing Option Bytes - confirmed Working (If I have no RDP on, and erase, RDP gets set, as 0xFF = RDP on)
4) Writing new Option Bytes, 16 Bit Operation. Here it fails.
Any Ideas? Ive attached two Logic Analyser captures (Saleae Logic 2 Software), one from slightly modified OpenOCD which unlocks successfully, and my implementation, which doesnt work.
My implementation:

OpenOCD:

Happy to hear your Ideas!
