/* Programs the FLASH User Option Byte: IWDG_SW, RST_STOP, RST_STDBY, BOOT1 and VDDA ANALOG monitoring.  */
FLASH_Status FLASH_OB_WriteUser(uint8_t OB_USER)
/* Programs the FLASH User Option Byte: IWDG_SW, RST_STOP, RST_STDBY, BOOT1 and VDDA ANALOG monitoring.  */
FLASH_Status FLASH_OB_WriteUser(uint8_t OB_USER)
{
  FLASH_Status status = FLASH_COMPLETE;
  status = FLASH_WaitForLastOperation(FLASH_ER_PRG_TIMEOUT);
  if(status == FLASH_COMPLETE)
  {
    FLASH->CR |= FLASH_CR_OPTPG; 
    OB->USER = OB_USER | 0x88;
    status = FLASH_WaitForLastOperation(FLASH_ER_PRG_TIMEOUT);
    if(status != FLASH_TIMEOUT)
    {
      FLASH->CR &= ~FLASH_CR_OPTPG;
    }
  }
  return status;
}