Content originally posted in LPCWare by KennethSoohoo on Thu Dec 27 17:21:14 MST 2012
All,
I'm working on bring-up on a simple LPC1857-based board.
The SDRAM is an IS42S16100E, which is different / smaller than all the existing examples.
I use this configuration:
LPC_EMC->DYNAMICCONFIG0 = 0<<14 | 0<<12 | 0<<9 | 1<<7; /* 16Mb, 1MBx16, 2 banks, row=11, column=8 */
The board's XTAL is 20Mhz. So I made this change:
CGU_SetXTALOSC(20000000);
and I run the board at 100Mhz using this setting:
CGU_SetPLL1(5);/* 5 * 20Mhz = 100Mhz */
I modified the SDRAM_Init.c from the ISI42S16400D sample.
I've created a simple SDRAM test, and I believe that I can write to the SDRAM with my current configuration.
****
Immediately after writing a value, I can read it back... but a second read on an address that I have not accessed always hangs the system.
So this loop always fails in the inner loop on j == 1.
pSDRAM = (unsigned long *)SDRAM_ADDR_BASE;
for (i = 0; i < 256; ++i)
{
pSDRAM = i | (i << 24);
for (j = 0; j < 256; ++j)
{
data[j] = pSDRAM[j];
}
}
****
Any suggestions on where to look?
Thanks,
Ken