lpcware

SDRAM Configuration

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jan 27, 2017 by Carsten Groen
Content originally posted in LPCWare by adityapadaria on Mon Apr 04 06:36:47 MST 2016
I am using MT48LC8M32B2 -7 IT (256Mbit, 8Mx16, 4 Banks, Row=12, Column=9) SDRAM on my LPC4357 board.


When i try to store 32bit data in RAM, it saves the different value sometimes.

I stored 10, but i saw 655360 in debug.


However the same program runs well on my LPC4357 Dev Board. It has MT48LC8M32B2 -6 (256Mbit, 8Mx16, 4 Banks, Row=12, Column=9) SDRAM. Only difference of SDRAM configuration between two boards is

[color=#36f]Dev Board:[/color]


Quote:
LPC_EMC->DYNAMICCONFIG0    = 1<<14| 1<<12| 2<<9 | 1<<7; /* 256Mb, 8Mx16, 4 banks, row=12, column=9 */

*((volatile uint32_t *)(SDRAM_ADDR_BASE | (0x32)<<(11))); /* 4 burst, 3 CAS latency */



[color=#36f]My Board:[/color] (Same as CMSIS Driver)


Quote:
LPC_EMC->DYNAMICCONFIG0    = 0<<14 | 1<<9 | 1<<7; /* 64Mb, 4Mx16, 4 banks, row=12, column=8 */

*((volatile uint32_t *)(SDRAM_ADDR_BASE | (3<<4 | 3)<<11)); /* 8 burst, 3 CAS latency*/




I have tried Dev Board's configuration but LCD is not running well.


Other hardware difference is

SDRAM Timing (Cycle Time) :
MT48LC8M32B2 -6    : 6ns (166 MHz)
MT48LC8M32B2 -7    : 7ns (143 MHz)


I need help to configure SDRAM.

Outcomes