AnsweredAssumed Answered

External SDRAM with EMC

Question asked by Dimitris Sideris on Jul 7, 2017
Latest reply on Jul 20, 2017 by Dimitris Sideris

Hi there,


I have a custom pcb mounted with an LPC4367 and interfaced with EMC an external sdram IS42S16320D of 512Mbit.


I have followed AN11508 and set up emc and sdram timings.


I have ported from lpcopen 3.01 for keil the process of initialization of EMC and sdram. I have also ported and run the memtest that lpcopen 3.01 provides (periph_memtest) and sdram works fine.


After setting up the emc and sdram i am kind of confused how to use the external sdram.


I have some questions.



What is the suggested procedure to correclty use external sdram?


Sdram is interfaced with microcontroller through emc

Do i have to go to Project-Settings-MCU and add the new sdram?

Do i have to manually modify the linker script?





I have only found scattered information and not a complete guide of how to use external sdram



In lpcopen 3.01 for keil 4357 (which i follow and port various things from there to my custom pcb)

in periph_lcd example the only thing i see regarding sdram is the below line:

static uint16_t *framebuffer = (uint16_t *) FRAMEBUFFER_ADDR;

where FRAMEBUFFER_ADDR is 0x28000000 which is the memory emc puts external sdram. I also configured emc for my custom pcb the same way. 0x28000000 is my base sdram address.



I see nowhere in project setting of adding a new ram block or any mention to that address in linker script or any use of cr_section_macros.h.


Is just declaring a pointer or a variable like the

static uint16_t *framebuffer = (uint16_t *) FRAMEBUFFER_ADDR

enough for using sdram?


NXP, I need some help and explanation.


Please don't post the obvious answers and links without any explanation like

Placing data into different RAM blocks 

Allocating dynamic memory in External SDRAM 


and links that google search returns.


I have read those and weren't concrete enough to get the whole picture.


Thanks a lot in advance!