I use the OMAP-L138 to write/read DDR2, and I have problem.
1/ if I write some data to DDR2 and read from it right now when I have written, the first data which I read is wrong and the rest is OK, but if I write some data to DDR2 and has some time delay, then I read from it and I find that the all data I read is ok. I think is the problem concern with the time of convert between read and write, so I try to change the bit T_WTR in register SDTIMR1, but find that it no use, so I want to know is there some other bit in this register or other register can effect it?
I use the DDR2 is MT47H128M8CF-3, and the datawidth is 8, and I use 2 chip to compose a 16 bit datawidth referring to the page 129 in the datasheet of OMAP-L138, the clock rate is 150Mhz
The registers configuration is this
DDR->SDBCR = 0x00134632
(DDR_DDR2EN -- 1)
(DDR_DDREN -- 1)
(DDR_SDRAMEN -- 1)
(DDR_NM -- 1)
(DDR_CL -- 3)
(DDR_IBANK -- 3)
(DDR_PAGESIZE -- 2);
The other is 0
DDR->SDRCR = 0x00000492
DDR->SDTIMR1 = 0x26922A09
(DDR_T_RFC -- 19)
(DDR_T_RP -- 2)
(DDR_T_RCD -- 2)
(DDR_T_WR -- 2)
(DDR_T_RAS -- 5)
(DDR_T_RC -- 8)
(DDR_T_RRD -- 1)
(DDR_T_WTR -- 1);
DDR->SDTIMR2 = 0x3C14C722
(DDR_T_RASMAX -- 7)
(DDR_T_XP -- 2)
(DDR_T_XSNR -- 20)
(DDR_T_XSRD -- 199)
(DDR_T_RTP -- 1)
(DDR_T_CKE -- 2);
2/ as I said above , I use 2 chip to compose a 16 bit datawidth referring to the page 129 in the datasheet of OMAP-L138 ,so is there anything(registers or bit in registers) I should notice particularly?
3/ there are some registers in DDR2 chip ,like < Standard Mode Register>< Extended Mode Register>, so should I configure these register in my program? Or I configure the 5 registers above and they can configure the Registers in DDR2chip automatically?
regards
xunliang