I've been reading the RM0316 Reference manual for STM32F303xB/C/D/E, STM32F303x6/8, STM32F328x8,
STM32F358xC, STM32F398xE advanced ARM ® -based MCUs, DocID022558 Rev 8 and have noticed following issues:
Page 70, Page Erase section, item 1 states: "Check that no Flash memory operation is ongoing by checking the BSY bit in the FLASH_CR register", but the FLASH_CR register does not contain BSY bit. I assume the authors meant FLASH_SR instead.
Page 73, Option Byte Programming, first paragraph contains the following sentence: "If not, the program operation is skipped and a warning is issued by the WRPRTERR bit in the FLASH_SR register." After testing this, I've noticed that at least the STM32F303VCT6 will respond by setting the PGERR bit in the FLASH_SR register. This behavior also matches what happens when attempting to overwrite regular non-erased flash memory.