printf("\n\n");
printf("+--------------------------------------------------------+\n");
printf("| Mini51 Flash Memory Controller Driver Sample Code |\n");
printf("+--------------------------------------------------------+\n");
/* Read BS */
printf(" Boot Mode ...................... ");
if (DrvFMC_GetBootSelect() == E_FMC_APROM)
printf("[APROM]\n");
else
{
printf("[LDROM]\n");
printf(" WARNING: The driver sample code must execute in AP mode!\n");
goto lexit;
}
/* Read CID */
i32Ret = DrvFMC_ReadCID(&cid);
if (i32Ret == 0)
printf(" CID ........................ [0x%08x]\n", cid);
i32Ret = DrvFMC_ReadDID(&did);
if (i32Ret == 0)
printf(" CID ........................ [0x%08x]\n", did);
/* Read Unique ID */
i32Ret = DrvFMC_ReadUID(0, &uid);
if (i32Ret == 0)
printf(" Unique ID [31:0]............ [0x%08x]\n", uid);
i32Ret = DrvFMC_ReadUID(1, &uid);
if (i32Ret == 0)
printf(" Unique ID [63:32]........... [0x%08x]\n", uid);
i32Ret = DrvFMC_ReadUID(2, &uid);
if (i32Ret == 0)
printf(" Unique ID [95:64]........... [0x%08x]\n", uid);
/* Read Data Flash base address */
u32Data = DrvFMC_ReadDataFlashBaseAddr();
printf(" Data Flash Base Address .... [0x%08x]\n", u32Data); |