Demo using extra 16K SRAM banks on LPC1768 for C object storage

Dependencies:   mbed

On-chip LPC1768 SRAM includes:

32 kB of SRAM on the CPU with local code/data bus for high-performance CPU access. Used by compiler for all variables and objects by default.

Two 16 kB SRAM blocks with separate access paths for higher throughput. These SRAM blocks may be used for Ethernet, USB, and DMA memory, as well as for general purpose CPU instruction and data storage. Using any of the SRAM in these banks requires a compiler directive in the object's declaration in the C++ source code.

int buffer_SRAM[3000]; //regular SRAM use by compiler
int buffer_SRAM_Bank0[4000] __attribute__((section("AHBSRAM0"))); //put in extra 16K bank
int buffer_SRAM_Bank1[4000] __attribute__((section("AHBSRAM1"))); //put in other extra 16K bank

Some Ethernet code uses one of the banks to buffer network packets.

History

ver 1.0 default tip

2022-09-23, by 4180_1 [Fri, 23 Sep 2022 14:09:54 +0000] rev 0

ver 1.0