7
\$\begingroup\$

I am looking forward to learn the ARM7 family of microcontrollers. When I searched on the internet, I found there are two versions: slightly older ARM7TDMI (LPC21xx etc) and newer Cortex M3 (LPC 17xx etc). I am a bit confused between these two. I want to choose one which can help me to get placed in a firm in future. Please help me to choose one and also please tell me the major difference between the both versions.

\$\endgroup\$
13
\$\begingroup\$

You partly answered the question yourself: Cortex is a newer, more advanced core. It's more powerful than the ARM7TDMI and at the same time uses less power: about double the DMIPS/mW.
The following table gives a nice overview of the differences (from this white paper):

enter image description here

(Apart from performance and power consumption) the up to 240(!) interrupts and the much improved interrupt latency make the Cortex a far better choice for real-time systems.

\$\endgroup\$
5
  • 4
    \$\begingroup\$ With regards to the Cortex-M3 design being newer, I have seen some manufacturers putting their ARM7 parts on the "not recommended for new design" lists. \$\endgroup\$ – semaj Jun 13 '11 at 18:44
  • \$\begingroup\$ Another example is that Atmel's Cortex-M3-based SAM3S series is partly intended to replace their ARM7TDMI-based SAM7S series. \$\endgroup\$ – Mike DeSimone Jun 14 '11 at 13:04
  • \$\begingroup\$ Regarding interrupts: Unfortunately, a lot of vendors don't use more than 31 interrupts. (I've seen one chip that used one Cortex-M3 interrupt for all the PIO interrupts, then used external registers to map the individual PIO interrupts.) One (lousy, IMHO) reason for this is that every extra interrupt increases the exception table size by four bytes. \$\endgroup\$ – Mike DeSimone Jun 14 '11 at 13:07
  • \$\begingroup\$ Is it just me, or is it surprising that they moved from a von Neumann to a Harvard architecture? That's a pretty fundamental difference. \$\endgroup\$ – Nick Johnson Aug 10 '11 at 4:10
  • \$\begingroup\$ @Nick - It certainly is, but I couldn't possibly say how much it contributes to the improved performance, or how much is due to other changes. \$\endgroup\$ – stevenvh Aug 15 '11 at 8:46
10
\$\begingroup\$

Why not learn both? You can get a cortex-m3 board for about 12 bucks, and something like a sam7s for about $35. As far as ARM goes if you want to have a good knowledge, start with the ARM7TDMI, learn ARM and thumb, then take thumb to the cortex-m3 and then thumb2 additions. ARM doesnt make chips they sell processor cores, the vendor wraps their special sauce around it. It is good to dabble in the different vendors with the same cores. The I/O and on chip peripherals will make or break you, and being able to choose the right vendor and/or avoid one that is not a good fit for the task is valuable.

From time to time I am involved with hiring decisions, and I agree with markrages. Its not all about knowing one core really well, there is a lot more stuff to know, dont get so specific. Ask the 6502 gurus (who have not moved forward with the industry) how their careers are going. A very small few very well the rest, not so much. I like to see a candidate that has on their own time and not just for a college class, gone out purchased a microcontroller or small eval board, and actually done something with it. Even if it is learn how to blink the leds four different ways using internal perhiperals. I prefer someone who has tried more than one processor and vendor, but we cant have everything we want. How fast and well you can pick up a datasheet or instruction set or different toolchain can be more valuable than how much of an expert you are in a specific core from a specific vendor. Some vendors have good datasheets and schematics, etc some do not, you need to know that all reference manuals are buggy and be able to hack and google your way through the weaknesses in the reference material.

ARM is the place to be right now, it would be foolish to be ignorant of their cores, and the major chip vendors using their cores. But also keep your eyes open to older and newer and different ones as well. The 8051 is still used in a number of places, it just wont die. Microchip still sells pic's. The avr was popular anyway (atmel really knows how to create happy customers) and the arduino took that popularity to a whole new level. Nothing is close to ARM in general, but ARM is not the only player in the different markets that it participates in.

Sparkfun has a number of boards for under 50 bucks, I recommend getting a few. The olimex header boards are good, sam7s-h64 or 256 for example. st has their stm32 discovery board (DO NOT CONFUSE IT WITH THE STM8 discovery, completely different processor line) for around 10 or so bucks. At under $5 you cant avoid getting one or two msp430 launchpads (not an arm but another, good, microcontroller core). You can get your feet with with the coridium armmite, or the maple, arduino footprint but ARM based not avr. One more than the other wants to provide the developer sandbox as well. the mbed2 is really easy to use, lpc is well known in the arm microcontroller world, but they are probably my least favorite of the choices, try a few different ones, at least one of the choices from atmel. Stellaris now owned by ti was the first to come out with the cortex-m3, other than the 800 series that I bricked within an hour or two instantly because I didnt pay attention to the 17 warning labels everywhere, I have liked all of their boards that I have tried. At least for talking to the peripherals and learning about oled. If you want to hook the microcontroller up to something not on the board the stellaris boards are probably the last choice. They have chewed up almost every I/O pin and you are to cut traces to get them back, basically paying for stuff on the board you dont intend to use, just get a coridium armmite pro or an olimex header board or something like that. avoid the lxpresso, it is specifically targeted to a tools vendor, dont even go near it, no dont...go with the mbed2 if you really want to get a lpc cortex-m3, and you do not have to even bother with the sandbox they encourage, compile your .bin file with any tool you like and simply copy it to the thing that looks like a usb/thumb drive and hit the reset button. That is the beauty of the mbed2 you are completely free to use whatever host OS and development tools you like. The negative is the retina burning blue leds. I had to swap mine out for green leds to avoid the instant migraine headaches.

Re-reading your question. Of the current family of ARM cores. The ARM7TDMI is the more traditional it supports the baseline 32 bit instruction set. ARM took that instruction set, and created a reduced ARM instruction set, known as the thumb instruction set. The thumb instructions map one to one with ARM instructions (the reverse is not true). So that the core only has to process ARM instructions, the thumb instructions are translated to ARM instructions on the way into the pipe. Not a bad design/idea. Look at the gameboy advance, 16 bit busses all over the place, cut back on cost, etc. Now the GBA is the exception to the rule that thumb runs slower than arm, not because of translation to arm instructions but because it was a subset that restricted you mostly half the registers and to two operand instructions instead of three, so it took more instructions to do the same thing in thumb as in arm. (Thumb binaries are often quite a bit smaller though). The next step was thumb2, basically this is variable instruction length, some instructions are 32 bit some 16 bit, they created a balance between some of the weaknesses of the thumb instruction set and strength of the arm. the binaries are not as small, but not as big as arm only, so with the performance gain is attractive to microcontrollers. The other thing they did is make these cortex-m cores that are thumb2 only, they do not have an arm core buried inside, these are through and through thumb2. lean and mean. Now these also execute thumb, so you can use thumb only tools that you have learned from the ARMv4T (the arm7tdmi). If you are not operating at the assembly language level, MOST of this does not matter at all to you, the part that may matter are the some assembly required bits, like the interrupt/exception table is completely different on the cortex-m series from the traditional ARM cores. If you are using someones sandbox then you wont even see that. if not writing assembler then what you need to learn is how to use the cross compilers and maybe linker scripts. With codesourcery making a good gcc toolchain for arm that is mostly done for you. You may want to go so far as to understand that things like ARM7 and ARMv7 are two completely different things, the ARM7 is an ARMv4, the ARMv7 is on the newer side. Also know that ARMv5, ARMv6, ARMv7 all added new instructions, and learn how to tell the compiler which core you have so it can make better choices using the newer instructions, giving better performance, likewise not accidentally using the wrong core choice and generating instructions that do not execute on your core. The cortex-m3 and now cortex-m0 are targeted at the traditional microcontrollers, the 8 bit folks. The cortex-A series are the higher end targeted at phones with big displays and dancing baloney, desktops, servers etc. You mentioned microcontrollers so you are likely to stay in the ARM7 or cortex-m arena. I have a thumb (not thumb2) instruction set simulator called thumbulator at github.com that boots like a cortex-m, so other than peripherals, which are easy to add, you can take code you learn to run there and move over to a cortex-m3 or m0. qemu makes a good simulator but is much harder to watch the execution and much harder to add peripherals to, but at the same time supports arm, thumb and thumb2 instruction sets. (there is a stellaris clone in there so you can use that one to get a feel for the cortex-m3 and use the stellaris docs to find the peripheral addresses, etc).

Go to ARM's website and find the ARM ARM (ARM Architectural Reference Manual) this is the melting pot of all their cores, at this point with so many variations it is getting a bit bloated, so you need to go look for TRMs (Technical Reference Manuals) for the specific cores. In particular the cortex-m3, you really want to have the TRM for the ARMv7M I think the cortex-m3 is called. It helps separate thumb2 from the ARM ARM. Understanding the boot process of the cortex-m3 and how it varies from the 32 bit arm is I believe in the TRM as well, perhaps it is ONLY in the TRM. Another thing to know, a particular vendor will buy a particular core and rev of that core. ARM may improve that core and sell a rev3 for example, but the vendor with the rev2 has the rev2. Even though ARM's website shows the TRM for rev2 as being replaced by the rev3 TRM, the rev2 TRM is the one you want as it matches the core you are using, sometimes you can get yourself confused or completely lost by using the wrong TRM. ARM prefers the vendors to not document the cores themselves the want to manage the documentation, so you need to bridge that gap from what the chip vendor is telling you and what docs on the ARM site to get. This kind of thing is making Linux support for ARM difficult for the higher end ARMs. And recently I noticed some huge mistakes in the Linux code connecting the wrong errata, wrong rev to the wrong vendor and wrong core. Likewise initializing things wrong because the wrong TRM was used to write the code. It is the unfortunate side effect of having cores used by many chip vendors in many different ways, while that core vendor is rapidly increasing the number of and quality of their products. You can do what I do a lot of the time, compile for ARMv4 arm mode or ARMv4 thumb mode and that code will run on pretty much all of the cores that followed. Unfortunately the tools, well gcc based, still have some pain and/or discomfort when using thumb. Takes some practice.

sorry for the long response, hope it is useful.

\$\endgroup\$
4
  • \$\begingroup\$ Okay, wow mouser has a bunch of microcontroller eval boards. there is the MOD-MMA7260, you dont have to use the accelerometer, there is an stm32l discovery, the mouser price is higher than others but their shipping is a lot lower \$\endgroup\$ – old_timer Jun 30 '11 at 5:28
  • \$\begingroup\$ Great in depth answer there :) \$\endgroup\$ – John Burton Jun 30 '11 at 15:02
  • \$\begingroup\$ Hey, can you elaborate on your advice against the LPCxpresso? I don't understand what you mean "it is specifically targeted to a tools vendor." To me, it seems like a low cost way to get started into ARM developing. \$\endgroup\$ – Frederick Jan 4 '15 at 1:54
  • \$\begingroup\$ At the time I was a bit upset that the product was only supported by one vendor. There are alternate bootloaders, etc...Now a few years later, for right around or under $10 you can get quite a few boards, Nucleos from ST, launchpads, etc. \$\endgroup\$ – old_timer Jan 4 '15 at 3:25
6
\$\begingroup\$

No hiring manager is going to care which exact part number you've worked with before. If you are looking to impress a potential employer, make sure the project you choose is interesting and you can speak clearly and confidently about it. You'll want to be able to share samples of your work with employers, so make sure you choose a project that allows for this in the license, or ask for permission before you get started.

The differences between processor families are minor as they relate to your objective. But I would suggest learning the newer part, since this knowledge has such a short shelf life anyway.

\$\endgroup\$
1
  • 4
    \$\begingroup\$ If you want to present yourself as an ARM expert you're better prepared for some questions. For one project we started with an Atmel ARM but found that it couldn't handle the 5000 interrupts per second due to a too high interrupt latency. It worked fine on an NXP. You can certainly make an impression if you know details like that. \$\endgroup\$ – stevenvh Jun 14 '11 at 9:07
1
\$\begingroup\$

As steven showed, the Cortex M3 is a more modern proccesor. It's a much more sophisticated device. If you compare the LPC21xx series to the LPC17xx, you get a lot of extra features including external memory busses, DMA, more MHz, ethernet, USB, etc. It's a much more complete device.

I've done a project with the LPC2129 for my internship. If you have worked with like ATMEGA, PIC18 series, 16KB RAM and 128KB flash looks a lot. In fact, you can write more powerful software quicker indeed, but the RAM runs out quickly if you have to do EEPROM caching (to improve the speed of processing data), UART buffers for packet processing, GUI code (was working with a graphical LCD screen) etc. I also noticed that I was missing some devices soon.. I wish there was some external RAM interface or a DMA peripheral to help transferring data. 60MHz is fast, but it was an application running at 'human speed', not used in regulating processes.

All in all, go for Cortex M3 while you can still make a free choice (LPC1759 or LPC1769 looks like a very good chip which is still in a reasonable DIY package). Faster, more memory, more peripherals, more interrupts, less power/MHz. The device seems similarly priced. Learning the ARM7TDMI is not bad though and will learn a lot about these platforms.

\$\endgroup\$
1
  • \$\begingroup\$ The only advantages I can see to the ARM7 (beyond compatibility with existing ARM7 code) are that conditional instructions are 32 bits instead of 48, the fixed 4-byte instruction size means computed-branch targets will naturally be full-word aligned without padding NOPs, and the instruction timings when running from RAM are predictable and position-independent. \$\endgroup\$ – supercat Jun 13 '11 at 20:41
1
\$\begingroup\$

The answer really depends on the industry sector that you want to get into. Look what micros they are using currently and go for them. Some examples are..

Highend Consumer electronics such as mobile phones and other gadgets - Cortex cores are good

Lowend consumer electronics such as simple toys and low value gadgets - 8bit and 16 bit cores like the Atmel AVRs or Microchip PICs are good choice.

Automotive such as body controllers and security - Older and proven cores such as PowerPC are good choices.

\$\endgroup\$
4
  • \$\begingroup\$ oxakhil asked about ARM7TDMI vs. Cortex, not AVR or PIC. \$\endgroup\$ – stevenvh Jun 14 '11 at 8:24
  • 2
    \$\begingroup\$ @stevenvh, that is true. He also asked which one to study for the purpose to get a place in the future. He didn't mentioned which industry he wants to target. No good studying ARM micro if he wants to work in the white goods industry, for example. \$\endgroup\$ – tehnyit Jun 14 '11 at 9:02
  • 1
    \$\begingroup\$ Don't underestimate ARM's range. Manufacturers like NXP are aggressively attacking the 8-bit market with low cost Cortex M0. I've seen quotes for the LPC1111 as low as 65 dollarcent. And that's for an HVQFN33 package. I expect lower pincount M0s in the near future, and lower pincount usually means lower price. \$\endgroup\$ – stevenvh Jun 14 '11 at 14:46
  • 1
    \$\begingroup\$ BTW, that 65 cent was for 10k/year. At 100k you should be able to pinch a few cents off that. Granted, you can buy a PIC for less, but I wonder if you can control a washing machine with these (1 I/O for instance). \$\endgroup\$ – stevenvh Jun 14 '11 at 15:03
1
\$\begingroup\$

I think the main problem is that you are confusing ARM 7 with ARMv7. The cortex processors use ARMv7 architecture. ARM7TDMI uses ARMv4 architecture. Took me a while to figure out that the 7 in ARM7 wasn't the same as the 7 in ARM version 7.

\$\endgroup\$
0
\$\begingroup\$

If you want to program your ARM in assembler (I assume you won't, but let's suppose) the ARM instructions set (not the Thumb set of the Cortexes!) is one of the nicest ones to learn and use. Other than that, the Cortexes seem to be the wave of the future for Microcontrollers. For Microcprocessors (the things with 200+ pins on a PCB with some memory chips, and probably running Linux) I am not so sure, the Snapdragon and the likes are ARM clones and seem to be pretty dominant in that market (along with various MIPS versions).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.