Question
FLASH_OB_Launch() hangs
Posted on March 07, 2015 at 12:12
Hello to all,
I am using a STM32F2xx device. I need to set Readout Protection via the firmware itsself (not via JTAG). I use this code: if (FLASH_OB_GetRDP() == RESET) { FLASH_OB_Unlock(); FLASH_OB_RDPConfig(OB_RDP_Level_1); Buzzer = 1; FLASH_OB_Launch(); Buzzer = 0; FLASH_OB_Lock(); } When I execute the code it hangs within FLASH_OB_Launch(). I checked this not with a debugger but with a buzzer that beeps continously (see the code) I even transferred the whole routine to RAM, to avoid issues with the flash being busy and code has to be read at the same time from flash. -> Still hangs in FLASH_OB_Launch(). However when I perform a power on reset everthing is fine and the Readout-protection is set. What can I do to have FLASH_OB_Launch() working properly? Thanks a lot Andy