-
Notifications
You must be signed in to change notification settings - Fork 22
MCU Info Page: LPC1768
The LPC1768 was the very first MCU to receive support from Mbed back in 2009, and it's one of the only early MCUs that's still supported in the latest Mbed version. While it might be getting a little long in the tooth, with fairly high power consumption and small RAM compared to its modern competitors, it's still a capable chip with a large array of peripherals. Not to mention, it has a significant base of educational users who rely on the Mbed LPC1768 dev board for their courses and projects. Here's hoping we can keep this venerable chip supported for a long time coming!
Note: Confusingly, the LPC1768 MCU's dev board is also called the LPC1768. This seems to be an early naming standard that was later dropped. On this page I'll say "the dev board" when I specifically mean the LPC1768 PCB.
CPU | Flash/Code Memory | RAM | Communication Peripherals | Other Features |
---|---|---|---|---|
Cortex-M3, up to 100MHz (clocked at 96MHz on the dev board) |
Total: 512 kiB Available to user:* 481.5 kiB |
Total: 32 kiB (SRAM) + 16 kiB (AHBSRAM0) + 16 kiB (AHBSRAM1) Available to user:* 20.1kiB See note about memory banks below |
|
|
*"Available to user" subtracts both regions of memory unusable by Mbed OS projects and the baseline memory used by a minimal build of Mbed OS.
The LPC1768 divides its RAM into three banks: main SRAM, AHBSRAM0, and AHBSRAM1. The AHBSRAM banks are optimized for use with DMA, but are also usable as standard RAM. However, they are not contiguous with the first one, so the GNU linker is not able to automatically place items in these memory banks. Thus, only the first 32k bank is available to naive code.
To make use of these memory banks, you need to manually place items in them using an attribute declaration. If you have code like this:
SomeLargeObject obj;
change it to:
SomeLargeObject obj __attribute__((section("AHBSRAM0")));
This will move the object into the ABHSRAM0 bank. This can be used on both global variables and static variables inside functions.
Additionally, when Ethernet connectivity is used, Mbed automatically places the networking buffers into AHBSRAM1.