There are some strange problems with SDRAM read and write. A 1M*32bits*4banks SDRAM is used in my C6713B-200M board, that is for a 32-bit data read and write manipulation, the maximum address range is 0x400000(4M).
I have developed two same boards with C6713B-200M. SDRAM works correctly in one board but some problems in other board. I have exchanged the two SDRAM chips and am sure that both of them works correctly.
In the board that SDRAM can't work properly, some strange and interesting problems can be found when view the SDRAM memory.
When i write data to SDRAM (32-bit mode) within the address range 0x10000(64k), the data writen to and read from SDRAM is correct. But when I increase the address range, the data is not correct and the D16 is always high. The following program and the corresponding result will explain more clear the problems are.
#define BUFFER_SIZE 0x10000
Src_StartAdd = (Uint32 *)0x80000000;
for(i=0;i < BUFFER_SIZE;i++)
{
*(Src_StartAdd++) = i;
}
when BUFFER_SIZE is set to 0x10000(the maximum right result range), the data is correct, that is *(0x80000000) = 0x00000000, *(0x80000004) = 0x00000001 and so on. But when BUFFER_SIZE is greater than 0x10000, the data is all wrong and there is always one bit D16 high in all data, that is *(0x80000000) = 0x00010000, *(0x80000004) = 0x00010001 , and so on.....
Any suggestion would be greatly appreciated...