ECE + BAS February 2014 - page 16

Many embedded developers are familiar with
the ARM Cortex processor architecture, but
few have the opportunity to become sufficiently
acquainted with this popular architecture to
take full advantage of its unique features and
capabilities. This is especially true for the new
ARM Cortex-M4 processor,which boasts an
improved architecture, native digital signal
processing (DSP) capabilities and an optional
floating-point accelerator, which a savvy pro-
grammer or hardware engineer can exploit to
their advantage.
Since many target applications for Cortex-M
based MCUs are portable and derive their
power from batteries or energy harvesting sys-
tems, most of the ideas we will explore involve
techniques for reducing the overall energy
consumption of a design. In many cases, how-
ever, these energy conservation techniques are
also helpful tools for designing processor-op-
timized applications that provide: more cost-
effective solutions, more processing margin
available for upgrades and new features, as
well as performance and features that help
products stand out in crowded markets.
Much like the original 16-bit processor cores
created by Advanced RISC Machines (ARM)
in the 1980s, the ARM Cortex series is based
on a Harvard-style RISCmachine with a modest
silicon footprint that enables high performance
as well as code and memory efficiency. The ar-
chitecture has evolved considerably over the
past decade, branching into three distinct sub-
families (or profiles) created to meet the re-
quirements of a particular application space:
A-profile products are optimized for high-per-
formance open application platforms, R-profile
processors include features for enhanced per-
formance and reliability in real-time applica-
tions, and the M-profile processor series was
developed for use in deeply-embedded MCUs
in applications where performance must be
balanced with energy efficiency and low solution
cost. Popular applications for the Cortex M se-
ries include smart metering, human interface
devices, automotive and industrial control sys-
tems, white goods, consumer electronics prod-
ucts and medical instrumentation.
The idea behind the Cortex-M3 architecture
was to design a processor for cost-sensitive ap-
plications while providing high-performance
computing and control1. These applications
include automotive body systems, industrial
control systems and wireless networking/sensor
products. The M3 series introduced several
important features to the 32-bit ARM processor
architecture including: non-maskable inter-
rupts, highly-deterministic, nested, vectored
interrupts, atomic bit manipulation, and op-
tional memory protection (MPU). In addition
to excellent computational performance, the
Cortex-M3 processor advanced interrupt struc-
ture ensures prompt system response to real-
world events while still offering low dynamic
and static power consumption2.
The Cortex-M3 and M4 processors share many
common elements including advanced on-chip
debug features and the ability to execute the
full ARM instruction set or the subset used in
THUMB2 processors. The Cortex-M4 processor
instruction set is enhanced by a rich library of
efficient DSP features including extended sin-
gle-cycle cycle 16/32-bit multiply-accumulate
(MAC), dual 16-bit MAC instructions, opti-
mized 8/16-bit SIMD arithmetic and saturating
arithmetic instructions. Overall, the most no-
ticeable difference between M3 and M4 is the
optional single-precision (IEEE-754) floating
point unit (FPU) available with the M4.
The success or failure of an embedded design
often rests on finding the right balance between
system performance, energy consumption and
solution cost. In many cases, developers can
use the unique features of the Cortex-M proces-
sor to optimize for product cost or energy ap-
petite while maintaining, or even improving,
its performance. For example, the Cortex-M
core has native serial I/O capabilities that can
be used to save energy, simplify development
and free up peripherals to be used for other
application tasks.
Getting the most from ARM
Cortex-M3 and M4 microcontrollers
By Rasmus Christian Larsen,
Silicon Labs
This article provides a closer
look at some of the more
interesting but often-over-
looked features found in
Cortex-M3 based microcon-
trollers (MCUs), as well as
new M4 variants.
February 2014
14
M
ICROCONTROLLERS
1...,6,7,8,9,10,11,12,13,14,15 17,18,19,20,21,22,23,24,25,26,...50
Powered by FlippingBook