The ARM Cortex-M is technically a microprocessor, but it is designed to enable microcontroller implementation and is commonly used as the core for microcontrollers. The key difference between a microprocessor and microcontroller is that a microcontroller integrates memory and peripherals along with a processor core in a single chip, while a microprocessor is just the processor core. The Cortex-M is the processor core that ARM offers for microcontroller development.
What is a Microprocessor?
A microprocessor is the central processing unit (CPU) or processor core of a computer system. It is a single integrated circuit (IC) chip that contains arithmetic, logic, control and interfacing functions to process data and execute instructions. A microprocessor does not contain built-in memory or peripherals. It requires external memory, peripherals and interfaces to function as part of a complete microcomputer system.
Microprocessors are designed to be general purpose so they can be used in many different applications. Popular microprocessor families include Intel x86, ARM, MIPS, PowerPC, SPARC and RISC-V. Microprocessors power everything from personal computers to smartphones to embedded systems.
What is a Microcontroller?
A microcontroller is a self-contained system-on-a-chip with a processor core, memory and programmable peripherals. Microcontrollers integrate key components of a microprocessor system onto a single chip. They contain memory and interfaces needed to function, requiring minimal external components.
Microcontrollers are designed for embedded applications so they are compact, low power and inexpensive. They are widely used in automatically controlled devices and products like home appliances, remote controls, toys, office machines, medical devices, power tools and motor vehicles.
Leading microcontroller architectures include 8051, PIC, AVR, ARM Cortex-M and MSP430. Microcontrollers may use 4-bit to 32-bit processor cores, with lower power 8-bit and 16-bit cores being common in basic models.
ARM Cortex-M Microcontrollers
The ARM Cortex-M is a family of 32-bit RISC processor cores designed specifically for microcontroller applications. Cortex-M cores are ARM implementations intended for deeply embedded, real-time, low-power, cost-sensitive devices. The Cortex-M is the most widely used 32-bit microcontroller architecture.
Though a microprocessor itself, Cortex-M cores have features tailored for integration into microcontroller ICs. The cores are compact, power-efficient, include memory protection capabilities and have a fast interrupt response. They are coupled with embedded flash memory, SRAM, peripherals and analog components to create complete microcontroller chip solutions.
ARM licenses Cortex-M processor IP to semiconductor companies who fabricate and sell Cortex-M based microcontrollers. Major vendors include NXP, STMicroelectronics, Microchip, Cypress, Silicon Labs, Renesas and Nuvoton. There are over 15 billion Cortex-M chip shipments across a diverse range of products and electronics.
Cortex-M Core Design
The Cortex-M is a 32-bit reduced instruction set computer (RISC) processor utilizing the ARMv6-M/ARMv7-M/ARMv8-M architectures. It uses a load-store architecture with only LDR, STR and LDM ARM instructions able to access memory. Data processing occurs using registers only. This allows simple, low cost microcontroller implementation.
Key attributes of Cortex-M cores include:
- 3-stage pipeline to achieve high performance at low power
- Nested Vectored Interrupt Controller
- Optional Memory Protection Unit
- Thumb-2 instruction set for improved code density
- Deterministic real-time response with low interrupt latency
- Integrated sleep modes and wake-up interrupt controller
- Processor core, bus interfaces, debug logic and interrupts packaged as IP modules
The NVIC enables low latency interrupt handling with configurable priority levels and vector tables. The MPU provides memory partitioning and access control. Thumb-2 gives Thumb instruction compression with additional 16 and 32-bit instructions. Idle sleep modes reduce power consumption. Module-based implementation allows custom SoC integration.
There are multiple Cortex-M core variants designed for different applications. The cores scale from small, low-cost microcontrollers to higher performance applications. Some notable Cortex-M cores include:
- Cortex-M0/M0+ – Ultra low power 32-bit core for cost sensitive and power constrained MCUs.
- Cortex-M3 – Mainstream MCU core delivering balance of performance and cost.
- Cortex-M4 – Digital signal control with DSP instructions and floating point unit.
- Cortex-M7 – Highest performance MCU core with microcontroller features.
- Cortex-M23/M33 – Real-time cores with microcontroller features plus ARMv8-M architecture.
Vendors implement Cortex-M cores in various microcontrollers with different memory sizes, peripherals and interfaces tailored for target applications. Cortex-M cores are even combined with application specific hardware accelerators in some microcontrollers.
Microprocessor vs Microcontroller Summary
- A microprocessor consists of just a processor core and must be combined with external components to function as a microcomputer system.
- A microcontroller integrates a microprocessor core along with memory, peripherals and interfaces in a single chip.
- The ARM Cortex-M is a microprocessor core designed specifically for microcontroller implementation.
- Cortex-M cores are widely used in MCU chips across a broad range of embedded applications.
So while the Cortex-M is technically a microprocessor, it was created for microcontroller development. Microcontroller vendors incorporate Cortex-M cores along with other components into complete MCU solutions. This enables the ARM Cortex-M to effectively serve as the processing brain within microcontroller ICs targeting the embedded computing market.