/* This function does not return until the protection has been saved. */
int32_t FlashUserSave(void)
/* This function does not return until the protection has been saved. */
int32_t FlashUserSave(void)
{
    HWREG(FLASH_FMA) = 0x80000000;
    HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT;
    while (HWREG(FLASH_FMC) & FLASH_FMC_COMT)
    {
    }
    HWREG(FLASH_FMA) = 0x80000001;
    HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT;
    while (HWREG(FLASH_FMC) & FLASH_FMC_COMT)
    {
    }
    return (0);
}