Empty check flag on STM32F030 (option bytes)
Hello,
I have a problem when flashing my MCU (STM32F030CCT).
After flashing, a Power On reset is always needed to start my SW (to reload the option bytes due to the "empty check flag").
From manual:
On STM32F070x6 and STM32F030xC devices only, internal empty check flag is implemented to allow easy programming of the virgin devices by the boot loader. This flag is used when BOOT0 pin is defining Main Flash memory as the target boot area. When the flag is set, the device is considered as empty and System memory (boot loader) is selected instead of the Main Flash as a boot area to allow user to program the Flash memory. This flag is updated only during Option bytes loading: it is set when the content of the address 0x08000 0000 is read as 0xFFFF FFFF, otherwise it is cleared. It means a power on or setting of OBL_LAUNCH bit in FLASH_CR register is needed to clear this flag after programming of a virgin device to execute user code after System reset.
I don't want to have to apply a POR after flashing. This is a requirement of our end of line process.
So I am wondering how I can retrieve the information "empty flag active" so I can reload by myself the option bytes using the OBL_LAUNCH ?
Thanks a lot !
