/* This function does not return until the protection has been saved. */
int32_t FlashAllUserRegisterSave(void)
/* This function does not return until the protection has been saved. */
int32_t FlashAllUserRegisterSave(void)
{
    uint32_t ui32Index;
    for (ui32Index = 0; ui32Index < 4; ui32Index++)
    {
        HWREG(FLASH_FMA) = (0x80000000 + ui32Index);
        HWREG(FLASH_FMC) = FLASH_FMC_WRKEY | FLASH_FMC_COMT;
        while (HWREG(FLASH_FMC) & FLASH_FMC_COMT)
        {
        }
    }
    return (0);
}