12 years, 3 months ago.

ARM Architecture

I'm very new to hardware and microcontroller programming in general and I still don't understand the probably most simple concept of all:

If I grab any ARM-based bare-metal microcontroller off the shelf, from what I understand that's STM32, the LPC controllers and many more, can I write the code for them with the MBED SDK?

3 Answers

12 years, 3 months ago.

While the instruction set of these controllers is compatible, the peripheral hardware and other environment details may be quite different. For example, the STM32 uses a completely different way of handling GPIOs from the LPC series (and even in the LPCs it differs quite a lot between the 17xx and 11xx series).

You can think of it as trying to run a binary from a generic desktop on an embedded industrial single-board PC - while the processor can run the instructions, the OS and hardware details are pretty different and so it will likely crash or loop infinitely.

So: no, you can't use the mbed SDK to make code for unsupported microcontrollers.

Accepted Answer
12 years, 3 months ago.

No, you can't. The processor core should be identical as long as it is the same ARM-core, at least functionally. However everything else is dependent on the company that produced them. For example the hardware block that generates PWM signals is different for each vendor (and also between microcontroller families of the same vendor). But also a PLL to generate the clock signal is vendor specific, and so is the memory mapping of the different peripherals.

Liam James
poster
12 years, 3 months ago.

Ok I see. How many LPC controllers are compatible with the mbed SDK?