LPC4337 SDRAM Configuration

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC4337 SDRAM Configuration

721 Views
moller
Contributor II


I have my a config file to setup my SDRAM that can be see here: http://pastebin.com/YupajrwX

I have made a test-function to see if I can write and read data to SDRAM which can be seen here: http://pastebin.com/n1UMgbid

If I set Value = 0xAB00 0000 i get:
"Error at counter = 1"
"Error at address 0x2800 0000"
"Data at address 0x2800 0000 is: 0xABAB ABAB"

If i select Value = 0xBB00 0000 i get:
"Data at address 0x2800 0000 is: 0xBBBB BBBB

Howcome this "mirroring effect" takes place? Where am I failing and how can I fix this?

Labels (1)
0 Kudos
2 Replies

484 Views
soledad
NXP Employee
NXP Employee

Hello,

In general this topic is covered in various software implementations for the LPC1800/4300, also some app notes are available (mostly valid for LPC1800/4300 as well):

http://www.nxp.com/documents/application_note/AN11508.pdf

http://cache.nxp.com/documents/application_note/AN10935.pdf?fsrch=1&sr=1&pageNum=1

For the software side I recommend to have a look into the following packages and into the attachment (relevant files only):

http://cache.nxp.com/files/microcontrollers/software/LPCWare/lpcopen_2_12_keil_iar_hitex_eva_4350.zi...


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

484 Views
moller
Contributor II

Hey Sol,

I used the EMC config and I can somewhat read/write from SDRAM.

I have made a test routine that writes from address 0x28000000. Data being written is 0x28000000+i.

When running this routine it stops at different itterations. Is this due to bad timing?

When setting the timing parameters I can't find following in my datasheet for the 64MB SDRAM (AS4C2M32SA-6TIN):

1)

uint32_t ReadConfig;/*!< Clock*/

2)

int32_t tSREX;/*!< Self Refresh Exit Time */

3)

int32_t tAPR;/*!< Last Data Out to Active Time */

If it is not timing based problems, what else could it be?

Kind regardsSigurd

0 Kudos