EmbeddedRelated.com
Books

The Designer's Guide to the Cortex-M Processor Family: A Tutorial Approach

Martin, Trevor 2016

The Designer’s Guide to the Cortex-M Microcontrollers gives you an easy-to-understand introduction to the concepts required to develop programs in C with a Cortex-M based microcontroller. The book begins with an overview of the Cortex-M family, giving architectural descriptions supported with practical examples, enabling you to easily develop basic C programs to run on the Cortex-M0/M0+/M3 and M4 and M7. It then examines the more advanced features of the Cortex architecture such as memory protection, operating modes, and dual stack operation.

Once a firm grounding in the Cortex-M processor has been established the book introduces the use of a small footprint RTOS and the CMSIS-DSP library. The book also examines techniques for software testing and code reuse specific to Cortex-M microcontrollers. With this book you will learn: the key differences between the Cortex-M0/M0+/M3 and M4 and M7; how to write C programs to run on Cortex-M based processors; how to make the best use of the CoreSight debug system; the Cortex-M operating modes and memory protection; advanced software techniques that can be used on Cortex-M microcontrollers; how to use a Real Time Operating System with Cortex-M devices; how to optimize DSP code for the Cortex-M4; and how to build real time DSP systems.

  • Includes an update to the latest version (5) of MDK-ARM, which introduces the concept of using software device packs and software components
  • Includes overviews of the new CMSIS specifications
  • Covers developing software with CMSIS-RTOS showing how to use RTOS in a real world design
  • Provides a new chapter on the Cortex-M7 architecture covering all the new features
  • Includes a new chapter covering test driven development for Cortex-M microcontrollers
  • Features a new chapter on creating software components with CMSIS-Pack and device abstraction with CMSIS-Driver
  • Features a new chapter providing an overview of the ARMv8-M architecture including the TrustZone hardware security model


Why Read This Book

You will get a clear, practical walkthrough of the ARM Cortex‑M family that turns architecture concepts into working C firmware you can deploy on real microcontrollers. The book blends core internals (exceptions, MPU, low‑power modes) with hands‑on topics like a small‑footprint RTOS and the CMSIS‑DSP library so you can move from learning to building robust embedded systems quickly.

Who Will Benefit

Embedded firmware engineers or hardware engineers with some C experience who want to master Cortex‑M internals and write reliable, real‑time firmware for M0/M0+/M3/M4/M7 devices.

Level: Intermediate — Prerequisites: Basic C programming and digital electronics fundamentals; familiarity with microcontroller basics (GPIO, registers, interrupts) and a general embedded toolchain is helpful.

Get This Book

Key Takeaways

  • Explain the Cortex‑M core architecture, exception model, and memory/bus structure for M0/M0+/M3/M4/M7
  • Write and optimize C firmware that follows Cortex‑M calling conventions, uses the NVIC, and handles interrupts safely
  • Configure MPU, dual‑stack operation, and operating modes to harden systems and separate execution domains
  • Integrate and use a small‑footprint RTOS (concepts and patterns for context switching, scheduling, and synchronization)
  • Apply the CMSIS libraries including CMSIS‑DSP for signal processing tasks on Cortex‑M devices
  • Adopt practical testing, debugging, and code‑reuse techniques specific to Cortex‑M firmware development

Topics Covered

  1. Introduction to the Cortex‑M Family and Development Ecosystem
  2. Cortex‑M Core Architecture and Programming Model
  3. Instruction Set Overview and Calling Conventions
  4. Memory Map, Buses and System Interconnect
  5. Exceptions, NVIC and Interrupt Handling Techniques
  6. System Control, Power Management and Low‑Power Modes
  7. Memory Protection Unit (MPU) and Operating Modes
  8. Stacking, Dual Stack Operation and Context Management
  9. Programming in C for Cortex‑M and CMSIS Overview
  10. Using CMSIS‑DSP for Embedded Signal Processing
  11. Real‑Time Systems: Small‑Footprint RTOS Concepts and Patterns
  12. Debugging, Testing and Validation of Firmware
  13. Software Architecture, Code Reuse and Portability
  14. Practical Examples, Case Studies and Toolchain Setup
  15. Appendices: Instruction Summaries, Reference Tables and Further Reading

Languages, Platforms & Tools

CARM AssemblyARM Cortex‑M0ARM Cortex‑M0+ARM Cortex‑M3ARM Cortex‑M4ARM Cortex‑M7Common microcontroller families (e.g., STM32, NXP/LPC) — general guidanceCMSIS (Core and DSP)CMSIS‑RTOS (concepts) / small‑footprint RTOS examplesGCC (arm-none-eabi)Keil MDKIAR Embedded WorkbenchDebuggers and probes (SWD/JTAG, OpenOCD, vendor tools)

How It Compares

Covers similar practical ground to Jonathan Valvano's Cortex‑M lab‑style books but focuses more on core architecture and system features; complements Joseph Yiu's more exhaustive Cortex‑M reference by emphasizing applied C firmware, RTOS use, and CMSIS‑DSP.

Related Books