Hello All,
1. I am interfacing SDRAM MT48LC4M32B2 with LPC2478. I am able to initialize it and test it in main() function without including it in scatter file.
Below is my problem statement........................................................ ..................................................................................... 2. i want use it as DATA, HEAP and STACK sections. hence added in scatter file and initialised in LPC2400.s but it can't work.
Below is scatter file................................................................ ..................................................................................... ; ************************************************************* ; *** Scatter-Loading Description File generated by uVision *** ; ************************************************************* LR_IROM1 0x00000000 0x00080000 { ; load region size_region ER_IROM1 0x00000000 0x00080000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) }
RW_IRAM1 0x40000000 0x00010000 { .ANY (+RW +ZI) } RW_IRAM2 0x7FE00000 0x00004000 { .ANY (+RW +ZI) }
RW_RAM1 0xA0000000 0x01000000 { ; RW data .ANY (+RW +ZI) }
ARM_LIB_HEAP 0xA0100000 EMPTY 0x8000 { }
ARM_LIB_STACK 0xA0110000 EMPTY -0x8000 { } } scatter file end..................................................................... .....................................................................................
Pity you didn't read the posting instructions for source code, or consider using something like pastebin
Before you try to get Keil to place data in the SDRAM you'd be much better validating your initialization code, and TESTING the memory integrity first. If this is a board you have designed you will need to pay attention to the circuit and pins used, and the clock rates, and the geometry and speed of the SDRAM.
Turn off "Run to main()" and step/analyze your startup code with a debugger.