Using the additional 16 / 32kB of RAM on LPC175x/6x MCUs

General discussions about working with the Astrobe IDE and programming ARM Cortex-M0, M3, M4 and M7 microcontrollers.
Post Reply
cfbsoftware
Site Admin
Posts: 493
Joined: Fri Dec 31, 2010 12:30 pm
Contact:

Using the additional 16 / 32kB of RAM on LPC175x/6x MCUs

Post by cfbsoftware » Sun Jan 27, 2013 7:10 am

LPC175x/6x MCUs with 32kB of more of SRAM are different from other LPC1xxx MCUs in that the SRAM is split into two separate blocks - CPU SRAM and AHB SRAM. The CPU SRAM is intended for general use and the AHB SRAM is used by the USB and Ethernet features of the MCU. However, if you are not using either of these features in your application you can use the additional RAM for your own purposes.

When you use the default Astrobe Linker options your application will only use the 32kB of CPU SRAM. You can use the extra AHB SRAM for dynamic memory (Oberon POINTER variables) by changing the Heap Start and Heap Limit settings on the Linker options. Because this frees up CPU RAM you can then use more / larger global and local variables in your application.

To demonstrate this run the attached example program on an LPC175x/6x MCU. Run it the first time with the default Linker Option settings and then run it again using the Heap Start / Heap Limit values for your MCU as shown in the header comments.
Attachments
ExtraRAM.zip
(1.11 KiB) Downloaded 1077 times

Post Reply