32bit sdram能不能这样接?各位,朋友用710画了块板子,用一片32bit 内存,w9812g2ih-6,12块买的,结果3片都不行,换用micron的一片8M的32bit,内存测试全部OK,但是在axd里Load image到内存中后,bin的数据全错,程序无法运行。连接图见图片,测试代码如下,全部OK,但是测试后,加载updater的axf文件,到0x8000的地址,数据错乱,单步都不能运行,不知何解.
for(i=0;i<32;i++)
{
*((volatile unsigned int *)0x4000)=1<<i;
*((volatile unsigned int *)0x4010)=1<<i;
}
for(i=0;i<32;i++)
{
for(j=0x8000; j<0x800000; j++)
{
reg1 = 1<<i;
*((volatile unsigned char *)j)=reg1;
reg = *((volatile unsigned char *)j);
if(reg != reg1)
{
uprintf("bad unit at%d, %d", j,i);
}
}
}
for(i=0;i<32;i++)
{
for(j=0x8000; j<0x800000; j+=2)
{
reg1 = 1<<i;
*((volatile unsigned short *)j)=reg1;
reg = *((volatile unsigned short *)j);
if(reg != reg1)
{
uprintf("bad unit at%d, %d", j,i);
}
}
}
for(i=0;i<32;i++)
{
for(j=0x8000; j<0x800000; j+=4)
{
reg1 = 1<<i;//0x55aaaa55;// 1<<i;
*((volatile unsigned int *)j)=reg1;
reg = *((volatile unsigned int *)j);
if(reg != reg1)
{
uprintf("bad unit at%d, %d", j,i);
//while(1);
}
}
}
while(1); |