I am trying to get the AS4C2M32SA-6TIN SDRAM to work with my LPC4337. I am not experienced with external memory.
I am able to write data to the first 32 addresses but the 33rd fails. I think the timings must be okay but something in my configuration is off.
Currently it is setup as: 2Mx32, 4BANKS, 11ROWS, 8COLS. Can someone verify this is the correct setup for this SDRAM?
Also, any ideas where I am failing to be able to access the whole 64 MB?
Your configuration is correct: 4 banks, 11 Rows, 8 columns
As far as I can see this SDRAM can be configured the same way as the SDRAM which is on the LPC1800/LPC4300 board from Keil (MCB1857/MCB4357). This is one of our reference boards in the LPCOpen package, so I would like to refer you to the schematic of this board and also to the configuration in the board layer of the LPCOpen package for the LPC4357.
Regards,
NXP Support Team
Thank you for the confirmation.
I found an example I have been following and I have attached my configuration file. If someone could help me identify why I can only write 32 words of data I would be greatful as I want to understand WHY I am having this problem.
Regards,
Sigurd
Standard mistake in hardware: wrong connection of address lines
Standard mistake in software: wrong initialization. See some hot spots mentioned below
My address lines are correct.
I did not have the BRC/RBC address mappings but neither of them makes a huge difference.
Mode is already set to burst length 4, sequential with a CL of 3.
Only my static buffer was enabled before but enabling the dynamic buffer does not make a huge difference either. I still get errors when I read from the 33rd word to validate.
Could you attach your init function for the static & dynamic memory interface, then I will have a look.
Also interesting would be the EMC frequency (with 1:2 clock divider or not).
Regards,
NXP Support Team