AnsweredAssumed Answered

FLASH_OB_Launch() hangs

Question asked by wild.andreas on Mar 7, 2015
Latest reply on Mar 10, 2015 by wild.andreas
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



Outcomes