|
发表于 2007-11-16 18:01:37
|
显示全部楼层
kal_uint16 code1,code2,code3;
typedef kal_uint16 FLASH_CELL;
void INTEL_CheckDevID(volatile kal_uint16 *die1_addr)
{
#if 0
kal_uint32 savedMask;
kal_uint16 code1,code2,code3;
volatile FLASH_CELL * fp = (FLASH_CELL *)die1_addr;
savedMask = SaveAndSetIRQMask();
fp[0xaa] = 0x0098;
code1 = fp[0x20];
code2 = fp[0x22];
code3 = fp[0x24];
fp[0] =0xFF;
RestoreIRQMask(savedMask);
// kal_prompt_trace(MOD_AUX,"code1 =%x code2=%x code3=%x",code1,code2,code3);
#else
kal_uint32 savedMask;
volatile FLASH_CELL * fp = (FLASH_CELL *)die1_addr;
savedMask = SaveAndSetIRQMask();
/*
fp[0] = 0x50;
fp[0] = 0x90;
code1 = fp[0x0];
code2 = fp[0x1];
*/
*(kal_uint16 *)(0x00E00000) =0x50;
*(kal_uint16 *)(0x00E00000) =0x90;
code1 = *(kal_uint16 *)(0x00E00000);
code2 = *(kal_uint16 *)(0x00E00001);
RestoreIRQMask(savedMask);
// m_trace2("factory code=%x,devicecode=%x",code1,code2);
// kal_prompt_trace(MOD_AUX,"code1 =%x code2=%x ",code1,code2);
#endif
}
读出来全是0,好像还是不对,能不能说的更清楚一些,多谢了!
有福同享呀~[em06] |
|