s3c2440对norflash的操作
时间:11-11
来源:互联网
点击:
Rdiv0 = 26;
rSRCPND = (0x1<19)|(0x1<28);
rSUBSRCPND = 0x1;
rINTPND = (0x1<19)|(0x1<28);
rINTSUBMSK = ~(0x1);
rINTMSK = ~((0x1<19)|(0x1<28));
pISR_UART0 = (U32)uartISR;
cmd = 0;
while(1)
{
switch(cmd)
{
case 1: //读ID
cmd = 0;
temp = get_en29lv160ab_id();
while(!(rUTRSTAT0 & 0x2)) ;
rUTXH0=(U8)((temp&0xff000000)>>24);
while(!(rUTRSTAT0 & 0x2)) ;
rUTXH0=(U8)((temp&0x00ff0000)>>16);
while(!(rUTRSTAT0 & 0x2)) ;
rUTXH0=(U8)((temp&0x0000ff00)>>8);
while(!(rUTRSTAT0 & 0x2)) ;
rUTXH0=(U8)((temp&0x000000ff));
reset_en29lv160ab();
break;
case 0x7:
cmd = 0;
test_en29lv160ab();
break;
case 0x6:
cmd = 0;
test_en29lv160ab_CFI();
reset_en29lv160ab();
break;
}
}
}
s3c2440norflas 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)