Skip to content

MCU Info Page: LPC1768

Jamie Smith edited this page Sep 13, 2022 · 17 revisions

LPC1768 MCU Overview

LPC1768 board

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.

Feature Overview

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
  • 3x I2C (2 pinned out on dev board)
  • 4x UART (3 pinned out on dev board), one has hardware flow control
  • 2x SPI
  • 1x CAN
  • 1x USB
  • 1x Ethernet
  • 1x DAC (AnalogOut)
  • 1x ADC (AnalogIn), 200kHz, 8 multiplexed inputs
  • 6x PWM outputs (must share a common pulse period)
  • RTC
  • 4x 32-bit hardware timers
  • DMA (not supported by Mbed, but can be used through the MODDMA library)

*"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.

A note about LPC1768 memory banks

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.

Clone this wiki locally