/* Erase All Option Bytes. 
This performs all operations necessary to erase the option bytes. These must first be fully erased before attempting to program them, therefore it is recommended to check these after an erase attempt.  */
void flash_erase_option_bytes(void)
/* Erase All Option Bytes. 
This performs all operations necessary to erase the option bytes. These must first be fully erased before attempting to program them, therefore it is recommended to check these after an erase attempt.  */
void flash_erase_option_bytes(void)
{
	flash_wait_for_last_operation();
	if ((FLASH_CR & FLASH_CR_OPTWRE) == 0) {
		flash_unlock_option_bytes();
	}
	FLASH_CR |= FLASH_CR_OPTER;
	FLASH_CR |= FLASH_CR_STRT;
	flash_wait_for_last_operation();
	FLASH_CR &= ~FLASH_CR_OPTER;
}