AnsweredAssumed Answered

Flash Programming Locked Out

Question asked by weber.patrick on Jun 18, 2012
Latest reply on Jun 28, 2016 by paller.gabor
I am using an STM32F407 device, with OpenOCD and a J-Link adapter for debugging and flash programming.

Everything has been working great until I suddenly am unable to program the flash on the device.  OpenOCD reports "stm32x device protected".  I traced this down to the WRPERR bit in the FLASH_SR.

For some reason this bit seems to be latched.  The flash reports that it is unlocked.  The OPTCR register has a value of 0x0FFFBBED.  I think that the BB should be AA and I modified OpenOCD to try to change that back (unlock, write the bits, write the start bit...). To no avail.

Is there any other reason that WRPERR would be latched?  I have read the programming manual and am out of ideas.

Thanks for any help/suggestions.