Prepared by Mahesh.R.K Asst - Prof. AIET GLB
Prepared by Mahesh.R.K Asst - Prof. AIET GLB
Prepared by Mahesh.R.K Asst - Prof. AIET GLB
MAHESH.R.K
Asst.Prof. AIET GLB
WHAT IS THE ARM CORTEX-M3 PROCESSOR?
The microcontroller market is vast, with more than 20 billion devices per year estimated
to be shipped in 2010. A bewildering array of vendors, devices, and architectures is
competing in this market.
The requirement for higher performance microcontrollers has been driven globally by
the industry’s changing needs; for example, microcontrollers are required to handle more
work without increasing a product’s frequency or power.
In addition, microcontrollers are becoming increasingly connected, whether by Universal
Serial Bus (USB), Ethernet, or wireless radio, and hence, the processing needed to
support these communication channels and advanced peripherals are growing. Similarly,
general application complexity is on the increase, driven by more sophisticated user
interfaces, multimedia requirements, system speed, and convergence of functionalities.
◦ The ARM Cortex™-M3 processor, the first of the Cortex generation of processors released by ARM in 2006,
was primarily designed to target the 32-bit microcontroller market. The Cortex-M3 processor provides excellent
performance at low gate count and comes with many new features previously available only in high-end processors
The Cortex-M3 addresses the requirements for the 32-bit embedded processor
market in the following ways:
Greater performance efficiency: allowing more work to be done without
increasing the frequency or power requirements
Low power consumption: enabling longer battery life, especially critical in
portable produ.cts including wireless networking applications.
Enhanced determinism: guaranteeing that critical tasks and interrupts are serviced
as quickly as possible and in a known number of cycles
Improved code density: ensuring that code fits in even the smallest memory
footprints
Ease of use: providing easier programmability and debugging for the growing
number of 8-bit and 16-bit users migrating to 32 bits
Lower cost solutions: reducing 32-bit-based system costs close to those of legacy
8-bit and 16-bit devices and enabling low-end, 32-bit microcontrollers to be
priced at less than US$1 for the first time
Wide choice of development tools: from low-cost or free compilers to full-
featured development suites from many development tool vendors
BACKGROUND OF ARM AND ARM ARCHITECTURE
A Brief History
ARM was formed in 1990 as Advanced RISC Machines Ltd., a joint venture of Apple
Computer, Acorn Computer Group, and VLSI Technology.
In 1991, ARM introduced the ARM6 processor family, and VLSI became the initial
licensee. Subsequently, additional companies, including Texas Instruments, NEC, Sharp,
and ST Microelectronics, licensed the ARM processor designs, extending the
applications of ARM processors into mobile phones, computer hard disks, personal
digital assistants (PDAs), home entertainment systems, and many other consumer
products.
ARM partners ship in excess of 2 billion ARM processors each year. Unlike many
semiconductor companies, ARM does not manufacture processors or sell the chips
directly. Instead, ARM licenses the processor designs to business partners, including a
majority of the world’s leading semiconductor companies. Based on the ARM low-cost
and power-efficient processor designs, these partners create their processors,
microcontrollers, and system-on-chip solutions. This business model is commonly called
intellectual property (IP) licensing.
In addition to processor designs, ARM also licenses systems-level IP and various
software IPs. To support these products, ARM has developed a strong base of
development tools, hardware, and software products to enable partners to develop their
own products
Architecture versions
ARM has continued to develop new processors and system blocks. These include the popular
ARM7TDMI processor and, more recently, the ARM1176TZ (F)-S processor, which is used in
high-end applications such as smart phones. The evolution of features and enhancements to the
processors over time has led to successive versions of the ARM architecture. Note that
architecture version numbers are independent from processor names. For example, the
ARM7TDMI processor is based on the ARMv4T architecture (the T is for Thumb instruction
mode support).
The ARMv5E architecture was introduced with the ARM9E processor families, including the
ARM926E-S and ARM946E-S processors. This architecture added “Enhanced” Digital Signal
Processing (DSP) instructions for multimedia applications. With the arrival of the ARM11
processor family, the architecture was extended to the ARMv6. New features in this architecture
included memory system features and Single Instruction–Multiple Data (SIMD) instructions.
Processors based on the ARMv6 architecture include the ARM1136J (F)-S, the ARM1156T2 (F)-
S, and the ARM1176JZ (F)-S.
. In this version, the architecture design is divided into three profiles:
The A profile is designed for high-performance open application platforms.
The R profile is designed for high-end embedded systems in which real-time
performance is needed.
The M profile is designed for deeply embedded micro controller-type
systems.
A Profile (ARMv7-A): Application processors which are designed to handle complex
applications such as high-end embedded operating systems (OSs) (e.g., Symbian,
Linux, and Windows Embedded). These processors requiring the highest processing
power, virtual memory system support with memory management units (MMUs), and,
optionally, enhanced Java support and a secure program execution environment.
Example products include high-end mobile phones and electronic wallets for financial
transactions.
R Profile (ARMv7-R): Real-time, high-performance processors targeted primarily at
the higher end of the real-time market, those applications, such as high-end breaking
systems and hard drive controllers, in which high processing power and high reliability
are essential and for which low latency is important.
M Profile (ARMv7-M): Processors targeting low-cost applications in which processing
efficiency is important and cost, power consumption, low interrupt latency, and ease of
use are critical, as well as industrial control applications, including real-time control
systems. The Cortex processor families are the first products developed on architecture
v7, and the Cortex- M3 processor is based on one profile of the v7 architecture, called
ARM v7-M, an architecture specification for micro controller products.
Below figure shows the development stages of ARM versions
Instruction Set Development
Enhancement and extension of instruction sets used by the ARM processors has been one of
the key driving forces of the architecture’s evolution. Historically (since ARM7TDMI), two
different instruction sets are supported on the ARM processor: the ARM instructions that are
32 bits and Thumb instructions that are 16 bits. During program execution, the processor can
be dynamically switched between the ARM state and the Thumb state to use either one of the
instruction sets. The Thumb instruction set provides only a subset of the ARM instructions,
but it can provide higher code density. It is useful for products with tight memory
requirements.
The Thumb-2 Technology and Instruction Set Architecture
The Thumb-2 technology extended the Thumb Instruction Set Architecture (ISA) into a
highly efficient and powerful instruction set that delivers significant benefits in terms of ease
of use, code size, and performance. The extended instruction set in Thumb-2 is a super set of
the previous 16-bit Thumb instruction set, with additional 16-bit instructions alongside 32-bit
instructions. It allows more complex operations to be carried out in the Thumb state, thus
allowing higher efficiency by reducing the number of states switching between ARM state
and Thumb state.
Focused on small memory system devices such as micro controllers and reducing the size of
the processor, the Cortex-M3 supports only the Thumb-2 (and traditional Thumb) instruction
set. Instead of using ARM instructions for some operations, as in traditional ARM processors,
it uses the Thumb-2 instruction set for all operations. As a result, the Cortex-M3 processor is
not backward compatible with traditional ARM processors.
Nevertheless, the Cortex-M3 processor can execute almost all the 16-bit Thumb instructions,
including all 16-bit Thumb instructions supported on ARM7 family processors, making
application porting easy. With support for both 16-bit and 32-bit instructions in the Thumb-2
instruction set, there is no need to switch the processor between Thumb state (16-bit
instructions) and ARM state (32-bit instructions). For example, in ARM7 or ARM9 family
processors, you might need to switch to ARM state if you want to carry out complex
calculations or a large number of conditional operations and good performance is needed,
whereas in the Cortex-M3 processor, you can mix 32-bit instructions with 16-bit instructions
without switching state, getting high code density and high performance with no extra
complexity.
The Thumb-2 instruction set is a very important feature of the ARMv7 architecture.
Compared with the instructions supported on ARM7 family processors (ARMv4T
architecture), the Cortex-M3 processor instruction set has a large number of new features. For
the first time, hardware divide instruction is available on an ARM processor, and a number of
multiply instructions are also available on the Cortex-M3 processor to improve data-
crunching performance. The Cortex-M3 processor also supports unaligned data accesses, a
feature previously available only in high-end processors.
Advantages of Cortex M3 processors
The Cortex-M3 addresses the requirements for the 32-bit embedded processor
market in the following ways:
Greater performance efficiency: allowing more work to be done without
increasing the frequency or power requirements
Low power consumption: enabling longer battery life, especially critical in
portable products including wireless networking applications
Enhanced determinism: guaranteeing that critical tasks and interrupts are
serviced as quickly as possible and in a known number of cycles
Improved code density: ensuring that code fits in even the smallest memory
footprints
Ease of use: providing easier programming and debugging for the growing
number of 8-bit and 16-bit users migrating to 32 bits
Lower cost solutions: reducing 32-bit-based system costs close to those of
legacy 8-bit and 16-bit devices and enabling low-end, 32-bit micro controllers
to be priced at less than US$1 for the first time
Wide choice of development tools: from low-cost or free compilers to full-
featured development suites from many development tool vendors
Cost savings can be achieved by improving the amount of code reuse across all
systems. Because Cortex-M3 processor-based micro controllers can be easily
programmed using the C language and are based on a well-established
architecture, application code can be ported and reused easily, and reducing
development time and testing costs.
Applications of Cortex M3
processors
Low-cost micro controllers: The Cortex-M3 processor is ideally suited for
low-cost micro controllers, which are commonly used in consumer products,
from toys to electrical appliances. It is a highly competitive market due to the
many well-known 8-bit and 16-bit micro controller products on the market. Its
lower power, high performance, and ease-of-use advantages enable embedded
developers to migrate to 32-bit systems and develop products with the ARM
architecture.
Automotive: Another ideal application for the Cortex-M3 processor is in the
automotive industry. The Cortex-M3 processor has very high-performance
efficiency and low interrupt latency, allowing it to be used in real-time systems.
The Cortex-M3 processor supports up to 240 external vectored interrupts, with
a built-in interrupt controller with nested interrupt supports and an optional
MPU, making it ideal for highly integrated and cost-sensitive automotive
applications.
Data communications: The processor’s low power and high efficiency,
coupled with instructions in Thumb-2 for bit-field manipulation, make the
Cortex-M3 ideal for many communications applications, such as Bluetooth and
ZigBee.
Industrial control: In industrial control applications, simplicity, fast response,
and reliability are key factors. Again, the Cortex-M3 processors interrupt
feature, low interrupt latency, and enhanced fault-handling features make it a
strong candidate in this area.
Consumer products: In many consumer products, a high-performance microprocessor (or
several of them) is used. The Cortex-M3 processor, being a small processor, is highly
efficient and low in power and supports an MPU enabling complex software to execute while
providing robust memory protection.
The Cortex-M3 Processor versus Cortex-M3-Based Micro Controllers
The Cortex-M3 processor is the central processing unit (CPU) of a micro controller chip. In
addition, a number of other components are required for the whole Cortex-M3 processor-
based micro controller. After chip manufacturers license the Cortex-M3 processor, they can
put the Cortex-M3 processor in their silicon designs, adding memory, peripherals,
input/output (I/O), and other features. Cortex-M3 processor-based chips from different
manufacturers will have different memory sizes, types, peripherals, and features.
THE THUMB-2 TECHNOLOGY AND INSTRUCTION SET
ARCHITECTURE
The Thumb-23 technology extended the Thumb Instruction Set Architecture (ISA) into a
highly efficient and powerful instruction set that delivers significant benefits in terms
of ease of use, code size, and performance (see Figure 1.4).
The extended instruction set in Thumb-2 is a superset of the previous 16-bit Thumb
instruction set, with additional 16-bit instructions alongside 32-bit instructions. It allows
more complex operations to be carried out in the Thumb state, thus allowing higher
efficiency by reducing the number of states switching between ARM state and Thumb
state. Focused on small memory system devices such as microcontrollers and reducing
the size of the processor, the Cortex-M3 supports only the Thumb-2 (and traditional
Thumb) instruction set. Instead of using ARM instructions for some operations, as in
traditional ARM processors, it uses the Thumb-2 instruction set for all operations. As a
result, the Cortex-M3 processor is not backward compatible with traditional