In this chapter we shall be looking briefly at the history and architecture of the ARM processors and ARM processor-based development boards.
The history of ARM processor is interesting. In 1981, the British Broadcasting Corporation (BBC) invited the computer firms to supply a computer to be used in educational projects. The Acorn Computers Ltd. was the winner and they developed a home computer based on the 8-bit microcontroller 6502, manufactured by the company MOS Technology. Although the 6502 was not a powerful microprocessor with today's standards, it was fast enough in those days and became very successful in the early 1980s.
The founders of the Acorn Computers Ltd. were Christopher Curry and Herman Hauser. Christopher used to work closely with Clive Sinclair of Sinclair Radionics Ltd. for over a decade. Sinclair had some financial troubles and later formed a new company called Sinclair Research Ltd. where Christopher was one of the main people in this new company. After a disagreement with Sinclair, Christopher left the company and formed the Acorn Computers Ltd with the Austrian physicist Herman Hauser.
During the early and late 1980s IBM produced their first PC based on the 16-bit microprocessor 8088. During these years IBM became very popular in the PC market with the early MSDOS operating system and many small competitors faded. The Acorn 6502 was only 8 bits and it was not powerful enough for graphics-based applications. During this time Acorn decided that they needed a new architecture with faster processor and they considered designing their own processor.
In 1990s Acorn came to the conclusion that their future lied not only in selling computers, but also in developing new computer architectures. Therefore, in 1990 Acorn Computers Ltd. established a new company called Advanced Reduced Instruction Set Computer (RISC) Machines Ltd. (ARM for short) as a joint venture with Apple Computer and VLSI Technology. In this venture, Apple invested by providing the cash, VLSI provided the necessary technology tools, and Acorn provided the experienced design engineers. By the year ARM became a £26.6 million company with net income of £2.9 million. In 1998 ARM, currently called ARM Holdings, was listed on the London Stock Exchange and NASDAQ. In later years ARM designed new processor architectures and sold the intellectual property rights as licenses to the firms who wished to incorporate ARM designs in their own products. In 2016 SoftBank bought ARM for $31 billion.
ARM has been designing 32-bit processors for over 20 years and in the last few years they have also started to offer 64-bit designs. In actual fact ARM is a company specialized in designing the processor architecture and they do not manufacture or sell processor chips. ARM makes money by licensing their designs to chip manufacturers. The manufacturers use the core ARM processors (e.g., the core CPU) and integrate with their own peripherals to end up in a complete microcontroller chip. ARM is then given royalty fees for each chip manufactured by the third-party companies. Companies that use ARM core processors include Apple, Atmel, Broadcom, Cypress Semiconductors, Freescale Semiconductors, Analog Devices, Nvidia, NXP, Samsung Electronics, Texas Instruments, Qualcomm, Renesas, and many others.
The ARM concept became so popular that in mobile applications in 2005, about 98% of all mobile phones sold used at least one ARM processor. In 2011, the 32-bit ARM architecture was the most widely used and most popular architecture used in mobile devices. Over 10 billion units were produces in 2013. The ARM architecture is known to offer the best MIPS to Watts ratio as well as MIPS to $ ratio in the industry, and the smallest CPU size.
Many ARM cores have been designed over the years, such as the ARMv1, ARMv2, …, ARMv8 and so on, ranging from 32-bits to 64-bits. The 32-bit ARMv7-A was the most widely used architecture in mobile devices in 2011. This includes architectures such as Cortex-A5, Cortex-A7, Cortex-A8, and so on. Lower performing cores have lower license fees than higher performing cores. The ARMv6-M and ARMv7E-M are used in lower performance microcontroller-based control and monitoring applications and these architectures include Cortex-M0, Cortex-M0 +, Cortex-M1, Cortex-M3, Cortex-M4, and Cortex-M7.
Basically there are two types computer designs as far as the CPU design is considered: Complex Instruction Set Computer (CISC) and RISC. Traditionally all CPU designs were based on CISC where the instruction set of these computers had many instructions. Many microprocessors, including the 6502 were based on CISC where some instructions were executed in one cycle and some others required several processor cycles to execute.
Most present day CPUs have limited instructions in their instructions sets and are therefore called RISC. ARM processors use RISC-based designs and this is one of the reasons that they are used widely, especially in mobile devices. Because of simpler designs the RISC processors use less number of transistors and therefore reduced power consumption. These processors execute one instruction per cycle and as a result these CPUs are fast, but they may need to execute more instructions for a given task. Normally, each instruction in a RISC-based design occupies one memory location. These instructions are fetched from the memory and are executed in one cycle each as fast as possible. RISC-based CPU designs also allow for several levels of pipelining where the next instructions are fetched from the memory while the current instruction is being executed, thus resulting in higher throughput. Also, because the RISC-based designs are simpler, they consume less power which is extremely important in battery operated mobile applications, such as in mobile phones, tablets, GPS systems, or games consoles. This is perhaps the major reason why the ARM architecture is widely used in mobile devices requiring very fast processing times as well as low power consumptions.
The choice of a microcontroller for a particular application depends on many factors such as the following:
For example, if we need to develop a battery powered portable device such as a mobile phone, a tablet, or a games console then high clock speed as well as long battery life are the main requirements. But if on the other hand, for example, we wish to develop a liquid level control system or a heating control system then high speed or low power consumption are not among the desired requirements. In general, as the clock speed goes up so does the power consumption and as a result a trade-off should be made in choosing a microcontroller for a specific application.
ARM processors are based on an instruction set called Thumb. With clever design this instruction set takes 32-bit instructions and compresses them down to 16-bits, thus reduces the hardware size, which also reduces the overall cost and the power consumption. The processor makes use of multistage pipelined architecture that is easier to learn, build, and program.
ARM's core architecture is only a processor and it does not include graphics, input-output ports, USB, serial communication, wireless connectivity, or any other form of peripheral modules. Chip manufacturers build their systems around the ARM core design and this is why different manufacturers offer different types of ARM-based microcontrollers.
Over the last 20 years or so ARM had developed many 32-bit processors. Fig. 3.1 shows some of the popular members of the ARM processor family. Around 2003 ARM decided to improve their market share by developing new series of high-performance processors mainly for microcontroller-based applications, such as in embedded control and monitoring applications. As a result, the Cortex family or processors were created. The Cortex family consists of three processor families: Cortex-M, Cortex-R, and Cortex-A. We shall now briefly look at these families.
Cortex-M series are built around the ARMv6-M architecture (Cortex-M0 and Cortex-M0 +) and the ARMv7-M architecture (Cortex-M3 and Cortex-M4). These processors are specifically designed for the microcontroller market, offering quick and deterministic interrupt responses, low power consumption, low cost, fairly high performance, and ease of use. The Cortex-M3 and Cortex-M4 are very similar in architecture and have the same instruction sets (Thumb 2) with the difference that the Cortex-M4 offers digital signal processing (DSP) capabilities and has optional floating point unit (FPU). Cortex-M4 with its DSP and floating point capability is an ideal processor for the IoT and wearable applications. For cost sensitive and lower performance applications the Cortex-M0 or the Cortex-M0 + can be used. The Cortex-M0 processor has small gate count (12K gates) and consumes only 12.5 μW/MHz. The Cortex-M0 + consumes only 9.85 μW/MHz and is based on a subset of the Thumb 2 instruction set and its performance is slightly above that of Cortex-M0 and below that of the Cortex-M3 and Cortex-M4. Cortex-M7 is a high-performance processor that can handle fast DSP and single or double precision floating point operations and is mainly used in applications where higher performance than the Cortex-M4 is required. In this book we will be using a microcontroller development board based on the Cortex-M4 architecture.
Cortex-R series are real-time higher performance processors than the Cortex-M and some members are designed to operate at high clock rates in excess of 1 GHz. These processors are commonly used in hard-disk controllers, network devices, automotive applications, and specialized in high-speed microcontroller applications. Cortex-R4 and Cortex-R5 are the early members and can be used at clock speeds of up to 600 MHz. Cortex-R7 is a newer member that incorporates 11-stage pipeline for high performance and it can operate in excess of 1 GHz. Although the Cortex-R processors are high performance, their architecture is complex and these processors consume high power, making them unsuitable for use in mobile battery powered devices.
Cortex-A are the highest performance ARM processors designed for use with real-time operating systems in mobile applications such as in mobile phones, tablets, GPS devices, games consoles, and so on. These processors support advanced features for operating systems such as Android, ioS, Linux, Windows, etc. In addition, advanced memory management is supported with virtual memory. Early members of the family included processors such as Cortex-A5 to Cortex-A17, based on the ARMv7-A architecture. Latest members of the family are the Cortex-A50 and Cortex-A72 series designed for low-power and very high-performance mobile applications. These processors are built using the ARMv8-A architecture which offers 64-bit energy-efficient operation with the capabilities of more than 4 GB of physical memory.
A comparison of the various Cortex-M series processors is given in Table 3.1. As can be seen from this table, Cortex-M0 and Cortex-M0 + are used at low speed and low power consumption applications. Cortex-M1 is optimized for use in programmable gate array applications. Cortex-M3 and Cortex-M4 are medium-power processors used in microcontroller applications with the Cortex-M4 supporting DSP and floating point arithmetic operations. Cortex-M7 is a high-performance member of the family which is used in applications requiring higher performance than the Cortex-M4.
|High-performance processor, used in applications where Cortex-M4 is not fast enough, supports DSP and single and double precision arithmetic
|Similar architecture as the Cortex-M3 but includes DSP and floating point arithmetic, used in high-end microcontroller-type applications
|Very popular, low power consumption, medium performance, debug features, used in microcontroller-type applications
|Designed mainly for programmable gate array applications
|Lower power consumption and higher performance than the Cortex-M0
|Low power consumption, low to medium performance, smallest ARM processor
Processor performance is usually measured using benchmark programs. There are many benchmark programs available and one should exercise care when comparing the performance of various processors as the performance depends on many external factors such as the efficiency of the compiler used and the type of operation performed for the measurement.
Many attempts were made in the past to measure the performance of a processor and quote it as a single number. For example, MOPS, MFLOPS, Dhrystone, DMIPS, BogoMIPS, and so on. Nowadays, CoreMark is one of the most commonly used benchmark programs used to indicate the processor performance. CoreMark is developed by Embedded Microprocessor Benchmark Consortium (EEMBC, www.eembc.org/coremark) and is one of the most reliable performance measurement tools available.
Table 3.2 shows the CoreMark results for some of the commonly used microcontrollers. As can be seen from this table, Cortex-M7 achieves 5.01 CoreMark/MHz, while the PIC18 microcontroller achieves only 0.04 CoreMark/MHz.
Processors in the Cortex family are upward compatible with each other. Cortex-M0 and Cortex-M0 + processors are based on the ARMv6-M architecture, using the Thumb instruction set. On the other hand, Cortex-M3, Cortex-M4, and Cortex-M7 are based on the ARMv7-M architecture, using the Thumb 2 instruction set which is a superset of the Thumb instruction set. Although the architectures are different, software developed on the Cortex-M0 and Cortex-M0 + processors can run on the Cortex-M3, Cortex-M4, and Cortex-M7 processors without any modifications provided the required memory and input-output ports are available.
Fig. 3.2 shows a simplified block diagram of the Cortex-M4 core architecture. Near the top left-hand side we can see the CPU which includes the ALU, register banks, instruction decoder, DSP module, and the memory interface. The DSP module is not available in the Cortex-M0 or Cortex-M3 cores. Notice that the memory is not part of the Cortex core and it is supplied by the company building the processor. The nested vectored interrupt controller is included at the top left corner of the figure. These are external interrupt inputs that can be used in interrupt-driven real-time applications. The core includes a FPU used to accelerate the floating point mathematical operations. The test and debug interface is shown at the bottom right-hand side of the figure. The bus matrix, memory protection unit, and peripheral interfaces are located at the bottom right hand-side of the figure. Notice that the core does not include the input-output ports.
Fig. 3.3 shows a microcontroller built around the Cortex core. Notice that this figure includes input-output ports, memory, and so on.
There are many ARM processor-based development boards. In this section we are only interested in the Cortex-M-based development boards which are used in microcontroller-based control and monitoring applications and which are also mbed compatible. Some popular development boards are described in this section. Details of mbed compatible ARM boards can be obtained from the following web site:https://os.mbed.com/platforms/
This is a 32-bit Cortex-M0-based development board (Fig. 3.4) having the following features:
The development board is packaged in a small DIP form factor that can be used with a breadboard for quick development and testing.
This is a high-performance Cortex-M3-based development board (Fig. 3.5) having the following features:
This development board is similar to LPC11U24 but it is based on the high-performance Cortex-M3 core and includes more program and data memories.
This is an ultralow-power 32-bit Cortex-M0 + core-based development board (Fig. 3.6). The board is ideal in applications requiring high performance and low-energy consumption. The basic features of this board are as follows:
Arch Pro is based on a variant of the LPC1768 Cortex-M3 core. This development board (Fig. 3.7) has the following features:
The advantage of this development board is that it supports Grove connectors and Arduino form factor and therefore large number of Grove modules and Arduino shields can be connected to the board.
This is a 44-pin development board based on the high-performance Cortex-M4 core (Fig. 3.8). The features of this board are as follows:
This development board (Fig. 3.9) is based on 32-bit Cortex-M3 core and has the following features:
This development board (Fig. 3.10) is based on 32-bit Cortex-M3 core and has the following features:
The LPCXpresso boards are actually two separate boards, and the debugger (called the LPC-Link) can actually be separated from the LPC1347 MCU half. This is useful if you plan to use the debugger with other boards inside the LPCXpresso IDE.
This development board (Fig. 3.11) is based on Cortex-M3 core and has the following features:
This development board (Fig. 3.12) is based on Cortex-M4 and has the following features:
This development board (Fig. 3.13) is based on Cortex-M4 core and has the following features:
STM32 Nucleo boards are high-performance mbed compatible ARM core-based development boards manufactured by STMicroelectronics. The family includes large number of low-cost development boards with different processing powers and power consumption levels to suit all types of applications. In this book, we shall be using the Nucleo-F411RE development board in our projects. We shall be looking at the details of this development board in great detail in the next chapter. It is worthwhile to look at the features of this board here briefly. Fig. 3.14 shows the Nucleo-F411RE development board. Its basic features are:
In this chapter we have learned about the following: