Archive for June, 2010

Playing with NXP’s Cortex-M3 Microcontrollers

Posted on Thursday, June 10th, 2010

I just recently bought a new NXP LPC1764 microcontroller (MCU), which is based on the ARM Cortex M3 processor. Being used to little 8bit Atmel AVR micros that run around 8MHz, the idea of a controller that is full 32 bit and runs at 100MHz is pretty exciting. It also has a lot of cool features, such as USB and Ethernet, which usually require extra 3rd party chips when you’re using AVRs. It’s surprisingly cost effective too when compared to the Atmel chips – the LPX17xx series are all between $12 and $18, only about twice the price of AVRs that are far less powerful.

I’m still trying to design a board for this controller. The first problem that I’ve encountered is that since this chip is quite new, there are no Altium libraries or footprints for it. The version of Altium I have does have the older Cortex-M0 chips in its library, and some of them use the same package as the 1764. I plan therefore to use the footprint from that (a 100 pin LQFP package) and create my own schematic for it. I’ll have to go through the datasheet and specify all the pins on the chip, which will take ages (since there are so many of them). It could be worse though – at least I don’t need to design the footprint.

The chip is a little unusual coming from a background of working with AVRs. The LPC requires 3.3V, as opposed to AVR chips that can be powered at 5V, so there’s a bit more work involved in power management. Since the chip runs at a lot faster clock rate that the AVRs, good board design becomes more critical. I’m thinking of making it as a four layer board, having a top and bottom layer as well as two planes (voltage and ground). This will reduce noise, with the benefit of making it a lot easier to route!

In-system programming of the chip should also be pretty easy, as apparently the LPC17xx series comes flashed with a bootloader that sets the USB port up as a mass storage device, so you can just drag and drop applications onto it. I still have to verify how this works. I will put a JTAG header on the board as well, as if I can’t get the USB ISP working, I can at least get an LCPXpresso board which can program the chip over JTAG.

I’m going to get the board manufactured with BatchPCB, and will post back with some more info if I can get it working. At this stage, I am just planning to have USB, a serial port or two, Ethernet and a lot of headers for IO on my first board. The LPC1764 doesn’t support external RAM, but hopefully I will be able to hook it up to some external flash memory (like a Compact Flash or SD card socket) to be able to load programs on even easier! The MCU doesn’t actually support these out of the box but there are lots of articles online about how to interface microcontrollers to those devices so it shouldn’t be too hard.

So far these ARM based microcontrollers look really awesome. I’ve been taking a look at Texas Instrument’s OMAP3 processors too – which are proper, discrete processors. Although they are more expensive and require a lot more supporting circuits and chips (such as external memory), they are far more powerful – running at speeds of around 600 to 800 MHz. I don’t know if I’d want to risk soldering a $60 processor onto a board I made though, so I’ll have to get some experience with the Cortex microcontrollers first! NXP have also announced the LPC177x microcontroller series too, which will feature a memory controller so I’ll hopefully be able to rig up something like 32 MB of RAM to it, which would give me far more headroom for dealing with graphics, multitasking, Ethernet transfers, and so on.