SoC
  • Home
  • Arm
  • Arm Cortex M0/M0+
  • Arm Cortex M4
  • Arm Cortex M3
  • Contact
Reading: What Is the Architecture of the Arm Cortex-M3?
SUBSCRIBE
SoCSoC
Font ResizerAa
  • Home
  • Arm
  • Arm Cortex M0/M0+
  • Arm Cortex M4
Search
  • Home
  • Arm
  • Arm Cortex M0/M0+
  • Arm Cortex M4
Have an existing account? Sign In
Follow US
  • Looking for Something?
  • Privacy Policy
  • About Us
  • Sitemap
  • Contact Us
© S-O-C.ORG, All Rights Reserved.
Arm

What Is the Architecture of the Arm Cortex-M3?

Jeday Schwartz
Last updated: October 5, 2023 9:55 am
Jeday Schwartz 7 Min Read
Share
SHARE

The Arm Cortex-M3 is a 32-bit processor core designed for embedded and low-power applications. It is based on the Armv7-M architecture and includes features like a 3-stage pipeline, memory protection unit, nested vectored interrupt controller, and low-power sleep modes.

Contents
OverviewArchitecture OverviewPipelineProcessor CoreMemory InterfaceNested Vectored Interrupt Controller (NVIC)Memory Protection Unit (MPU)Wake-Up Interrupt Controller (WIC)Memory Accelerator Module (MAM)Execution ModesInstruction SetMemory and PeripheralsPhysical ImplementationDevelopment ToolsLicensingConclusion

Overview

The Cortex-M3 is a relatively simple and compact processor core, intended for microcontroller and deeply embedded applications. It emphasizes power efficiency and low cost, making it suitable for use in products like home appliances, wearables, toys, and IoT devices.

Key features of the Cortex-M3 architecture include:

  • 32-bit ARMv7-M architecture
  • 3-stage pipeline
  • Up to 1.25 DMIPS/MHz performance
  • Memory Protection Unit
  • Nested Vectored Interrupt Controller
  • Wake-up Interrupt Controller
  • Optional Memory Accelerator Unit
  • Low-power sleep modes

These features provide a good balance of performance, power efficiency, and die size for embedded applications. The pipeline, NVIC, and sleep modes in particular help optimize the power and performance trade-off.

Architecture Overview

The Cortex-M3 has a streamlined architecture built around a 3-stage pipeline – Fetch, Decode, Execute. Let’s look at some of the main components of the architecture:

Pipeline

The 3-stage pipeline fetches instructions, decodes them, and executes them in an overlapping fashion to improve performance. The pipeline allows up to 3 instructions to be worked on at once. Branch prediction helps minimize pipeline stalls.

Processor Core

The core contains the main processor logic including arithmetic logic unit (ALU), multiplier, barrel shifter, registers, write buffer, and other components needed for instruction execution. It has 13 general purpose 32-bit registers.

Memory Interface

The memory interface handles loads and stores between the core and main memory. It supports up to 4GB of memory and includes instruction and data caches to improve performance.

Nested Vectored Interrupt Controller (NVIC)

The NVIC provides advanced interrupt handling with nested interrupts and priorities. This improves responsiveness and real-time behavior. There are up to 240 interrupt channels.

Memory Protection Unit (MPU)

The MPU provides memory access control and helps prevent corruption between different processes and tasks. Up to 16 memory regions can be defined with access permissions.

Wake-Up Interrupt Controller (WIC)

The WIC allows interrupts to wake up the processor from low power state. This allows efficient sleep mode usage.

Memory Accelerator Module (MAM)

An optional MAM provides instruction prefetch capabilities to improve performance by reducing stalls. It includes a 64-byte prefetch buffer.

Execution Modes

The Cortex-M3 supports two execution modes – Thread Mode and Handler Mode. Thread mode is used for regular program execution. Handler Mode is used for exception handling.

The processor enters Handler Mode when an exception occurs, running the corresponding exception handler. Privileged operations like changing stack pointer are only available in Handler Mode.

Instruction Set

The Cortex-M3 implements the Thumb-2 instruction set, which includes both 16-bit and 32-bit instructions. 16-bit Thumb instructions help optimize code density, while 32-bit instructions are used for more complex operations.

Key features of the Thumb-2 instruction set include:

  • 16-bit and 32-bit instructions
  • Uniform register access in both instruction lengths
  • Load/store architecture with base + offset addressing
  • Conditional execution and branches
  • Extensive interrupt handling support

The instruction set provides a good blend of code density and performance for embedded systems. Compiler optimizations like interworking help utilize both 16-bit and 32-bit instructions efficiently.

Memory and Peripherals

The Cortex-M3 is designed as a processor core and does not include embedded memory or peripherals. These are provided by the specific microcontroller implementation. The core uses buses like AHB-Lite to connect with memory and peripherals.

Typical configurations include:

  • Up to 256KB of embedded Flash memory
  • Up to 64KB of SRAM
  • External memories and memory mapped peripherals
  • Communication peripherals like UART, SPI, I2C
  • Analog peripherals like ADC, DAC
  • Digital peripherals like Timers, PWM, RTC

The flexible memory architecture and standard bus interfaces allow the Cortex-M3 to be integrated with a wide range of peripherals for different application needs.

Physical Implementation

The Cortex-M3 core is delivered as synthesizable RTL (Verilog or VHDL) which chip designers can integrate into their ASIC or FPGA projects. It is also available as hard macrocell blocks for easier SoC integration.

In silicon implementations, the core occupies about 0.08 mm2 of die area in a 90nm process. This compact size makes it suitable for SoCs targeting cost-sensitive embedded applications.

The clock speed is scalable up to 100 MHz in most processes, providing good performance for a low-power core. Power consumption depends on specific implementation but ranges from 9-12 mW/MHz on 90nm.

Development Tools

The Cortex-M3 can be programmed using industry standard embedded development tools like:

  • GCC toolchain for C/C++
  • Arm Keil MDK for C/C++
  • IAR Embedded Workbench for C/C++
  • Arm Mbed web IDE

These include compiler optimizations for Thumb-2 instructions. Debugging is done through JTAG/SWD interfaces using tools like J-Link, ULINKplus, etc.

Licensing

The Cortex-M3 is available under various licensing models:

  • Individually licensed processor IP
  • Bundled with an Arm Artisan physical IP core
  • As part of a PrimeCell chip design kit
  • Included in Arm DesignStart program

This flexible licensing allows the core to be integrated into commercial SoC designs under affordable terms. Software development can be done using GCC or MDK with no licensing fees.

Conclusion

In summary, the Arm Cortex-M3 provides a compact and efficient 32-bit processor core for embedded microcontroller applications. Its Thumb-2 instruction set, 3-stage pipeline, interrupt handling, and memory protection provide good performance and real-time capabilities while maintaining low power consumption and silicon footprint ideal for SoC integration.

Newsletter Form (#3)

More ARM insights right in your inbox

 


Share This Article
Facebook Twitter Email Copy Link Print
Previous Article What Is the M Profile of the Arm Cortex?
Next Article Is the Cortex-M ARMv8?
Leave a comment Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

2k Followers Like
3k Followers Follow
10.1k Followers Pin
- Sponsored-
Ad image

You Might Also Like

Things to Check When Cortex-M1 Enters Hard Fault Early On

When the Cortex-M1 processor encounters a fatal error early in…

9 Min Read

Bootloading Cortex-M1 with RTX Application

Booting a Cortex-M1 processor with an RTX real-time operating system…

8 Min Read

How to Implement a Loop Position Independent in ARM Cortex-M0+?

Implementing a loop position independent in ARM Cortex-M0+ requires utilizing…

7 Min Read

Key factors in upgrading legacy Cortex-M0 designs to Cortex-M0+

Upgrading from the older Cortex-M0 to the newer Cortex-M0+ microcontroller…

8 Min Read
SoCSoC
  • Looking for Something?
  • Privacy Policy
  • About Us
  • Sitemap
  • Contact Us
Welcome Back!

Sign in to your account