Loading DesignSpark, please wait..

We apologise for the slowness of this page You are using Internet Explorer 6, upgrading your browser will greatly enhance your experience using DesignSpark

The gateway to online resources and design support for engineers, powered by RS ComponentsAllied

Use your Cortex in the ARM jungle

Posted by Bill Marshall on

5218 views

There was a time when deciding which microprocessor to use for a new project was pretty easy: there weren’t that many to choose from. Who remembers the Intel 8080, Motorola 6800 or the CBM 6502? These were all 8-bit microprocessors - no internal program memory – unlike subsequent devices with internal memory known as microcontrollers. Today sees the launch of a new NXP microcontroller device in the mbed format known for its revolutionary development system in the ‘Cloud’. This provoked some thinking about selection criteria: why choose this new mbed module in preference to its predecessor?

mbed cortex-m0

Nowadays there are many more manufacturers producing 8, 16, 32 and even 64-bit devices each with their own peculiar instruction sets and architecture. Not only that, but containing mostly microcontrollers, each family has a huge range of clock speeds, memory sizes and on-chip peripheral controllers. The situation is made more complicated by ARM who design 32-bit processor cores and license them to others. At the time of writing practically every major chip manufacturer uses one or more ARM cores at the heart of their products. The big exception is Microchip of course, although they used a MIPS core when they needed a 32-bit range.

Far from making choice easier, the large variety of ARM core designs can lead to much frustration and head-scratching. There’s the ARM 7, the ARM 9, ARM 11, the new Cortex series and all their variants. It’s going to take rather more than this blog post to go through all the pros and cons of each member of the ARM catalogue, so I’ll just take a look at the Cortex series. There are three main groups: Cortex-M, Cortex-A and Cortex-R. The main common feature that separates the Cortex devices from the other ARM cores is the built-in interrupt controller that makes them more suitable for embedded control systems.

Cortex-A based devices are very fast microprocessors using external dynamic RAM for program storage. The RAM is used because Flash memory technology is not fast enough for the  processor clock speeds in excess of 500MHz required for high-end multimedia and communication systems.

Cortex-R based devices are also very fast with external program memory designed for embedded systems requiring not only real-time control, but features such as error correction to ensure reliability, Typical applications can be found in the automotive sector. The Texas Instruments Hercules range of fault-tolerant MCUs is based on the Cortex-R4F. See my blog post on this subject.

Cortex-M based devices are the workhorses of the range. They are true microcontrollers with on-chip Flash program memory suitable for most general purpose embedded control applications. Most manufacturers feature Cortex-M devices in their catalogue. Let’s look more closely at the M variants. The most popular up to now has been the M3 with its comprehensive and efficient 32-bit instruction set. To improve efficiency in applications that just don’t need 32-bit muscle, the Cortex-M devices feature a set of 16-bit instructions called ‘Thumb’. An example device is the NXP LPC1768 used in the first mbed. The Microchip PIC32 is usually considered roughly equivalent to a Cortex-M3 device. Moving up, we come to the M4 which has all the M3 instruction set plus dedicated DSP instructions. These make for much more efficient code when implementing real-time digital FIR filters or performing frequency analysis with Fast Fourier Transforms (FFT). An example of a device with an M4 core is the Freescale Kinetis K40. The top of the range title (currently) goes to the M4F which adds floating-point maths instructions to the M4 set. Code using these instructions can run 5 or 6 times faster than that using software routines. ST Microelectronics offer this core in their STM32F4 device.

Back to the new mbed module. This features the NXP LPC11U24 device with a Cortex-M0 core. As you might have guessed, this is the bottom end of the range and aimed firmly at the mid-range PICs. It really is a RISC machine featuring most of the 16-bit Thumb instruction set. The devices are dirt-cheap, very simple (but upwardly compatible with the rest of the Cortex-M range) and consume very little power. Hence their target application area of mobile, battery-powered systems. They have multiple ‘sleep’ modes to take advantage of the low-power technique involving wake-on-interrupt, process quickly then go back to sleep again until the next interrupt. See my article in eTech magazine on this subject.

So there you have it: a quick tour of the ARM Cortex-M microcontrollers. Of course I’ve missed loads of stuff out (particularly all the peripheral hardware added by the device manufacturers) and not explored all the other ARM cores available, but that will have to wait for a more in-depth article.

 

If you're stuck for something to do, follow my posts on Twitter. I link to interesting new electronics components and development kits (some of them available from my employer!) and retweet posts I spot about robot and space exploration issues.

3 comments

Comments

  • get29 Avatar get29

    Posted by get29 at

    Good idea ! thank you so much for your quick answer, it will be faster than using the tool "measure gap". But i think it would be good if DesignSpark could also create the tool i have described.

  • shughes Avatar shughes

    Posted by shughes at

    I'm not aware of a tool that does what you need. However, you can right-click on a part or hole and use 'Type Coordinates' to position something exactly where you want it. If you find the coords of one item then you can use trig. to calculate the position of the next using distance and angle.

  • get29 Avatar get29

    Posted by get29 at

    Hello, i'm a french student and i'm in work placement in a french company, and i have to use your software to replace their old one, that is to say Protel. For the moment I found your soft really easy to use and intuitive, but for measuring the placement of some items it is really difficult ; for my example, i have to place several holes all around my PCB but at a precise distance between each other. The only tool i found to do that is the tool "measure gap" and i'm obligated to place two shape at a random distance and to bring them closer (or away depending of the distance) thanks to the mouse and to measure again and again... i can't be precise and it make me loose a lot of time... Is there an other Tool to delimit a distance as in protel thanks to a line (see picture attached) or a menu to define the lenght of a shape for example (because if i do a double-click on a shape i have done, i can only have informations about it, i can't define the dimentions...) ? I hope you understood all i've said, thank you.

    Attachments
    example_protel.png
Leave a comment