bsp中有function
int32_t FMC_ReadUID(int index, uint32_t * u32data)
{
if ((index < 0) || (index > 2))
return E_FMC_INVALID_PARAM;
FMC->ISPCMD = FMC_ISPCMD_READ_UID;
FMC->ISPADR = 0x04 * index;
FMC->ISPTRG = FMC_ISPTRG_ISPGO;
while (FMC->ISPTRG & FMC_ISPTRG_ISPGO) ;
if (FMC->ISPCON & FMC_ISPSTA_ISPFF)
{
FMC->ISPCON = FMC_ISPSTA_ISPFF;
return E_FMC_ISP_FAIL;
}
*u32data = FMC->ISPDAT;
return E_FMC_OK;
} |