Code: Select all
//------------------- DEFINES ---------------------------------
#define CORE_MOD_MCF54410 0
#define CORE_MOD_MCF54415 1
#define CORE_MOD_MCF54416 2
#define CORE_MOD_MCF54417 3
#define CORE_MOD_MCF54418 4
#define CORE_MOD_MAX_INDEX CORE_MOD_MCF54418
//------------------- STRUCTS ---------------------------------
typedef struct
{
short CpuId;
char Name[10];
}s_CPUidList;
//------------------- GLOBAL VARS -----------------------------
unsigned short cpuID =0;
s_CPUidList sCPUidList[]=
{
{ 0x09F, "MCF54410"},
{ 0x0A0, "MCF54415"},
{ 0x0A1, "MCF54416"},
{ 0x0A2, "MCF54417"},
{ 0x0A3, "MCF54418"},
};
/*** Identify Core Module Version ***/
cpuID = sim1.ccm.cir >> 6;
for(i=0; i < CORE_MOD_MAX_INDEX; i++)
{
if(sCPUidList[i].CpuId == cpuID)
{
iprintf("CPU MODULE: index[%d], CPUid: 0x%x, %s\n", i, sCPUidList[i].CpuId, sCPUidList[i].Name);
}
}