Hi everyone,
ive been trying to interface a 16MB SDRAM (MT84LC8M16A2, 128Mbit,
2x16x4)with an AT91RM9200 on my custom board. The SDRAM and the uC are placed close to each other on the 2-layer PCB (which me and my friend designed).I wrote a small SDRAM test program that sends a unique *byte* to each location of the SDRAM, and then reads it back..it ran without any errors, all values matched. so i concluded that the sdram was working fine.
But no..im trying to load u-boot into the SDRAM. I found this application on the AT91-CDROM -> i first send a file called "loader.bin" into the SRAM (via HyperTerminal) using the default ROM bootloader of the AT91Rm9200 ..this "loader.bin" file re-inits the xmodem service on the uC ( i can see CCCCCC.. again), and then im supposed to send "u-boot.bin". (This u-boot.bin is transferred directly to the SDRAM)
"loader.bin" goes in fine, but when i try sending "u-boot.bin", the Hyperterminal file transfer exits with a "too many errors" message after sending one or two packets.
I think the CRC checking of the embedded xmodem service is failing, and thats whats causing the errors. Which casts doubts on the SDRAM again..any ideas?
One thing more..how does the uC know that theres only one 16MB SDRAM chip connected, instead of two as on the AT91Rm9200-DK? How does a
32-bit number get stored on the SDRAM when the data bus width is only 16-bits? The only change ive made to the SDRAM initialisation software available for the At91rm9200-Dk is configuring the data-bus to be 16-bit (instead of 32-bit as on the -DK)The following is the list of connections between the SDRAM and the uC, please tell me if u think theyr ok:
16-bit data bus (configured by writing 0x10 in the SDRAM controller`s mode register on the uC)SDRAMC pins -----> Pins on the SDRAM
----------- ----------------- A2-A11-----> A0-A9 SDA10-----> A10 A16-A17(BA0-BA1)-----> BA0-BA1 SDCKE-----> CKE SDCK-----> CLK A0/NBS0-----> DQML NBS1-----> DQMH CAS-----> -CAS RAS-----> -RAS SDWE-----> -WE SDCS-----> -CS D0-D15-----> DQ0-DQ15