/* Static Helper Function to set customer info valid bits. 
Use this function to set the state of the 128 valid bits at the beginning of customer info space. If these bits are not set correctly then the customer protection bits in the INFO space will not be honored by the hardware. */
static int customer_info_signature_set(void)
/* Static Helper Function to set customer info valid bits. 
Use this function to set the state of the 128 valid bits at the beginning of customer info space. If these bits are not set correctly then the customer protection bits in the INFO space will not be honored by the hardware. */
static int customer_info_signature_set(void)
{
    uint32_t ui32Valid[4];
    int iRC;
    if ( am_hal_flash_customer_info_signature_check() )
    {
        return 0;
    }
    if ( !customer_info_signature_erased() )
    {
        return (2 << 16);
    }
    ui32Valid[3] = AM_HAL_FLASH_INFO_SIGNATURE3;
    ui32Valid[2] = AM_HAL_FLASH_INFO_SIGNATURE2;
    ui32Valid[1] = AM_HAL_FLASH_INFO_SIGNATURE1;
    ui32Valid[0] = AM_HAL_FLASH_INFO_SIGNATURE0;
    iRC = g_am_hal_flash.flash_program_info(AM_HAL_FLASH_PROGRAM_KEY,
                                            0,
                                            ui32Valid,
                                            0,
                                            4);
    return iRC | ((iRC) ? (1 << 16) : 0);
}