DSPRelated.com
Forums

SDRAM - file Initialization problem

Started by neha d March 12, 2010
Hi,

I am using SDRAM to store an array[320][240]. I am declaring array as:
#pragma section("sdram0")
unsigned int frame_buffer[2][320][24];

I have loaded the initialization file SDRAMInit.dxe. Problem is my
application does not run after loading this initialization file. If I remove
this initialization file

I get Warning ld0151. (initialixation file warning)
If I remove the sdram option from my application it runs properly.

1) Please let me know if I am missing anything in file initialization
procedure.

SDRAMInit.c

#define CONFIG_EBIU_SDRRC_VAL 0x0817
#define CONFIG_EBIU_SDBCTL_VAL 0x0013
#define CONFIG_EBIU_SDGCTL_VAL 0x0091998d

int main() {

/* Program the external memory SDRAM controller. */
*pEBIU_SDRRC = CONFIG_EBIU_SDRRC_VAL;
*pEBIU_SDBCTL = CONFIG_EBIU_SDBCTL_VAL;
*pEBIU_SDGCTL = CONFIG_EBIU_SDGCTL_VAL;
}

2) Is above sdram init code ok? Is there anything more I have to add to for
proper initialization of above file

Thanks,

Neha