lpcware

Ram is not enough, could I use extern SDRAM as ram?and How?

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by lifejoker on Thu May 08 00:22:01 MST 2014
To any one who could help,
I am using IAR+LPC4357+ external SDRAM + LWIP+UFFS.
My ram is not enough, i need to use external SDRAM as RAM . The code i am using was download from LPCOPEN, external SDRAM is initialized in Board_SystemInit.

/* Set up and initialize hardware prior to call to main */
void Board_SystemInit(void)
{
/* Setup system clocking and memory. This is done early to allow the
   application and tools to clear memory and use scatter loading to
   external memory. */
Board_SetupMuxing();
Board_SetupClocking();
Board_SetupExtMemory();
}

I tried change _RAM_start__ and RAM_end__  in  lpc4357_m4.icf
define symbol __ICFEDIT_region_RAM_start__ =
define symbol __ICFEDIT_region_RAM_end__   =

which are changed to the address of external SDRAM(0X28000000), but when i download to device, it goes to HardFault_Handler.
I guess it is because SDRAM doesn't work at the beginning. but what should I do with it? or should I use assembly code to initialize SDRAM first ?if then is there any code to refer to ?
Thanks so much.

Outcomes