- 积分
- 72
贡献355
飞刀130 FD
注册时间2018-5-7
在线时间17 小时
扫一扫,手机访问本帖
|
/*
* For EIM General Configuration registers.
* CS0GCR1:
* GBC = 0; CSREC = 6; DSZ = 2; BL = 0;
* CREP = 1; CSEN = 1;
* EIM Operation Mode: MUM = 1
SRD = SWR = 0.
* (Async write/Async page read, multiplexed)
* CS0GCR2:
* ADH = 1
*/
writel(0x00610099, nor_reg);
writel(0x00000001, nor_reg + 0x00000004);
/*
* For EIM Read Configuration registers.
* CS0RCR1:
* RWSC = 1C;
* RADVA = 0; RADVN = 2;
* OEA = 2; OEN = 0;
* RCSA = 0; RCSN = 0
* CS0RCR2:
* APR = 1 (Async Page Read);
* PAT = 4 (6 EIM clock sycles)
*/
writel(0x1C022000, nor_reg + 0x00000008);
writel(0x0000C000, nor_reg + 0x0000000C);
/*
* For EIM Write Configuration registers.
* CS0WCR1:
* WWSC = 20;
* WADVA = 0; WADVN = 1;
* WBEA = 1; WBEN = 2;
* WEA = 1; WEN = 6;
* WCSA = 1; WCSN = 2;
* CS0WCR2:
* WBCDD = 0
*/
writel(0x1404a38e, nor_reg + 0x00000010);
writel(0x00000000, nor_reg + 0x00000014);
EIM端口配置如上,DA[15:0]数据线地址线复用。
配置之前用示波器测出 片选CS0恒为低电平,按如上配置之后,片选CS0恒为高电平,请问是什么原因?谢谢。
|
|