Surely most engineers are familiar with the basics of the ARM7TDMI? To recap, it has a 32-bit register set with 16 registers, RISC load/store architecture, various processor modes with a role in exception processing, private registers in each mode (particular FIQ with a very useful r8-r14), a simple 32-bit instruction set with only 21 types and an additional 16-bit instruction set with zero-penalty decode logic. Since it was originally released in 1994, several of ARM's engineers wanted to improve on perfection. Perhaps the power consumption could be made even lower, perhaps the instruction set could be made even more dense, perhaps more microcontroller features should become part of the standard design? The shrinking area of silicon required for a microcontroller, and the resulting reduction in cost, presented another opportunity. It should be possible to make an ARM chip as small as an 8-bit micro, and to consume less power. Cortex-M3 is the result of these factors. It is not radically different from ARM7TDMI, and retains most of the architectural features. But it drops several, expands others, and adds a few more. Key features of Cortex-M3 are:
- You program it entirely in C. There is no longer any need for assembler, although it is still available. This doesn't mean that it is less efficient
- It won't run Linux. It is aimed at small microcontrollers so does not include data aborts for virtual memory, etc.
- Built-in microcontroller functions, such as interrupt controller, timers, memory protection
- Drops exception modes and the ARM instruction set (only supports Thumb / Thumb 2)
- Thumb-2 instruction, a clever extension which gives the code size benefits of Thumb with the performance benefits of 32-bit ARM code
- Single Wire Debug (SWD) option, which reduces the number of pins required for JTAG/debug functions from 5 to 2
- Integrated trace functionality, traditionally only available on higher end ARM9 devices. Cunningly, it also operates over the SWD port
- Half the interrupt latency (or better), by building the concept of state saving directly into the micro. In particular, consecutive interrupts can be processed without the traditional save/restore step in between
- Half the power consumption when running, plus an integrated sleep mode
- 30% faster operation at the same clock speed
- ARMv7-M Harvard architecture with a number of new instructions