cancel
Showing results for 
Search instead for 
Did you mean: 

OPEN OCD STM32F0x protect/unprotect maybe work

Quentin_27
Associate II

Hi everyone,

I'm trying to turn on or off readout protection on STM32f031G6U6 with openocd:

I'm using this command : 

openocd -f interface/cmsis-dap.cfg -f target/stm32f0x.cfg

And as you can see i try to protect and unprotect them and it works, (i have open STM32cube programmer and it say flash protection active), but I don't understand the error below ... 
"fail to write memory at 0xfff..."

> stm32f0x options_read 0
option byte register = 0xffffff00
write protection register = 0xffffffff
read protection: off
watchdog: software
stop mode: no reset generated upon entry
standby mode: no reset generated upon entry
user data = 0xffff
> stm32f0x lock 0
stm32x locked
> stm32f0x options_read 0
option byte register = 0xffffff00
write protection register = 0xffffffff
read protection: off
watchdog: software
stop mode: no reset generated upon entry
standby mode: no reset generated upon entry
user data = 0xffff
> stm32f0x options_load 0
SWD DPIDR 0x0bb11477
Failed to write memory at 0xffffffff

[stm32f0x.cpu] clearing lockup after double fault
[stm32f0x.cpu] external reset detected
[stm32f0x.cpu] halted due to debug-request, current mode: Handler HardFault
xPSR: 0xc1000003 pc: 0xfffffffe msp: 0xffffffd8
> stm32f0x options_read 0
option byte register = 0xffffff02
write protection register = 0xffffffff
read protection: on
watchdog: software
stop mode: no reset generated upon entry
standby mode: no reset generated upon entry
user data = 0xffff
>

 if anyone have already see this error ? or an idea ?

Thanks for reading 

Have a good day.

 

 

0 REPLIES 0