EmbDev.net

Forum: ARM programming with GCC/GNU tools How to use USBRAM for general purpose?


Author: Prakash Rajolli (Company: Coinel Technology Solutions) (prakash)
Posted on:

Rate this post
0 useful
not useful
Hi,

According to LPC17xx user manual the LPC1768 has a total of 64kB of 
SRAM. I understand that there is a 32kB bank of SRAM connected to the 
CPU's instruction and data busses, which is readily accessible.


There are two more 16kB banks of SRAM which are stated as typically 
being used for peripheral data but can supposedly still be used for 
general purpose instruction and data storage.


In my project I have to use 40kb to 45kb SRAM. Could you please anybody 
tell me how to use USBRAM? If any body can help on this, that will be 
very appreciated.

-Prakash
9886545216

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Prakash Rajolli wrote:
>...
> There are two more 16kB banks of SRAM which are stated as typically
> being used for peripheral data but can supposedly still be used for
> general purpose instruction and data storage.
Fist of all make sure if the two additional regions can be freely used 
by the core. There may be limitations to use this RAM.

> In my project I have to use 40kb to 45kb SRAM. Could you please anybody
> tell me how to use USBRAM? If any body can help on this, that will be
> very appreciated.
a possibility:
- define the memory-region of the USB-RAM in the linker-script 
(additional line in the MEMORY block)
- use the section variable attribute (see GCC manual) to assign the 
variables which should be stored in the USB-RAM
- define additional output-section which places the input-sections given 
with the attribute into the USB-RAM.
- you may have to copy initial values and/or write zero-values for the 
variables in the addtional section.
You may look into startup-codes, linker-scripts and examples for GBA.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.