Dear Sirs,
SDRAM : Alliance AS4C32M16SB-7TIN , 8M word x 16-bit x 4-bank.
EMIF_CLK : 44MHz
Problem : When I write a 16 bit data at one odd address, the whole SDRAM looks to be written that data. And when I write data at even address, it seems not write any data. The uKEIL C memory window display the result. I also read the data at different address after last write. The result is same as memory window displayed.
My configuration for SDRAM has 3 parts:
1. clock : please refer my system.c.
2. pin connection : please refer my pinmux.c.
3. emif_SDRAMInit( ) : please refer my emif.c.
read / write code :
volatile uint16 *ptr = ((volatile uint16 *)0x80000000U);
uint16 aaa[10];
.....
while(1)
{
*ptr = (uint16)0x1234;
*(ptr+1) = (uint16)0x5678;
*(ptr+2) = (uint16)0x9ABC;
*(ptr+3) = (uint16)0xDEF0;
*(ptr+4) = (uint16)0x2233;
*(ptr+5) = (uint16)0x4455;
*(ptr+6) = (uint16)0x6677;
*(ptr+7) = (uint16)0x8899;
aaa[0] = *ptr;
aaa[1] = *(ptr+1);
aaa[2] = *(ptr+2);
aaa[3] = *(ptr+3);
aaa[4] = *(ptr+4);
aaa[5] = *(ptr+5);
aaa[6] = *(ptr+2);
aaa[7] = *(ptr+3);
}
Maybe I configure wrong or miss some important setting. Could anyone help me to figure out the problem. Thank you so much.