could I use extern SDRAM as ram?

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

could I use extern SDRAM as ram?

861 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gbg on Thu Jan 08 16:04:10 MST 2015
Hi
I use lpc1788 with 32mb external ram my compiler id kiel
could I use extern SDRAM as ram? how?

thanks
Labels (1)
0 Kudos
Reply
4 Replies

717 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gbg on Fri Jan 09 15:02:02 MST 2015
thanks

The compiler performs memory allocation?
The memory address collision does not occur?

and

Can I define for each separate section of Rome
Like this :

RW_RAM1 0xA0000000 UNINIT 0x00001000 { ; RW data
* (VRAM)
}
RW_RAM1 0xA0001001 UNINIT 0x00001000 { ; RW data
* (FS_RAM)
}
RW_RAM1 0xA0002000 UNINIT 0x00010000 { ; RW data
* (USB_RAM)
}

unsigned char arr[0x10000] __attribute__ ((section ("USB_RAM"), zero_init));

0 Kudos
Reply

717 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Fri Jan 09 09:53:05 MST 2015
yes, if you are placing sections VRAM, GUI_RAM etc in the SDRAM. In keil,  if you want to place 10 element of an array of unsigned int in SDRAM you need to declare it in your code and can use with above scatter loading file.

unsigned Int arr[10]  __attribute__ ((section ("GUI_RAM"), zero_init));

I think it is better to place stack in internal RAM.
0 Kudos
Reply

717 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gbg on Fri Jan 09 02:38:50 MST 2015
Thanks

i modify file to

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 0x10000000 0x00010000  {  ; RW data
   .ANY (+RW +ZI)
  }
  RW_RAM1 0xA0000000 UNINIT 0x02000000  {  ; RW data
   * (VRAM, GUI_RAM, GUIDEMO_STACK, FS_RAM, IP_RAM, USB_RAM)
  }
}

is true?
0 Kudos
Reply

717 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Thu Jan 08 19:42:53 MST 2015
Hi gbg,
You can use it, however it won't be as fast as internal SRAM. You can modify keil Scatter file to use external SDRAM as SRAM.
0 Kudos
Reply