The Designer's Guide to the Cortex-M Processor Family
eBook - ePub

The Designer's Guide to the Cortex-M Processor Family

  1. 490 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

The Designer's Guide to the Cortex-M Processor Family

Book details
Book preview
Table of contents
Citations

About This Book

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

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access The Designer's Guide to the Cortex-M Processor Family by Trevor Martin in PDF and/or ePUB format, as well as other popular books in Design & Industrial Design. We have over one million books available in our catalogue for you to explore.

Information

Publisher
Newnes
Year
2016
ISBN
9780081006344
Edition
2
Topic
Design
Chapter 1

Introduction to the Cortex-M Processor Family

Abstract

The Cortex-M family is a range of highly scalable processors specifically designed for embedded microcontrollers.This introduction provides an overview of each processor in the Cortex-M family.

Keywords

ARM; Cortex-M; Cortex-M0; Cortex-M0+; Cortex-M3; Cortex-M4; Cortex-M7; Thumb-2; pipeline
Since the first edition of this book was published in 2013, the number of Silicon Vendors providing Cortex-M-based devices has almost doubled and the number of microcontroller variants is now well over 3000 and continues to rise. A decade ago I was familiar with the key features of all the mainstream Cortex-M microcontrollers in use. Today I struggle to keep up with the range of devices available, could be old age of course but you get the picture. In this book we are going to learn about the Cortex-M processor itself and also the software techniques required to design effective and efficient application code. This book is arranged as a tutorial and it is best to work through it chapter by chapter. Each chapter contains a number of hands on examples and you will learn a lot more by actually doing the examples.

Cortex Profiles

In 2004, ARM introduced its new Cortex family of processors. The Cortex processor family is subdivided into three different profiles. Each profile is optimized for different segments of embedded systems applications (Fig. 1.1).
image

Figure 1.1 The Cortex processor family has three profiles Application, Real Time, and Microcontroller.
The Cortex-A profile has been designed as a high-end application processor. Cortex-A processors are capable of running feature-rich operating systems such as Win RT and Linux. The key applications for Cortex-A are consumer electronics such as smartphones, tablet computers, and set-top boxes. The second Cortex profile is Cortex-R. This is the real-time profile that delivers a high-performance processor which is the heart of an application-specific device. Very often a Cortex-R processor forms part of a “system-on-chip” design that is focused on a specific task such as hard disk drive (HDD) control, automotive engine management and medical devices. The final profile is Cortex-M or the microcontroller profile. Unlike earlier ARM CPUs, the Cortex-M processor family has been designed specifically for use within a small microcontroller. The Cortex-M processor currently comes in six variants: Cortex-M0, Cortex-M0+, Cortex-M1, Cortex-M3, Cortex-M4, and Cortex-M7. The Cortex-M0 and Cortex-M0+ are the smallest processors in the family. They allow silicon manufacturers to design low-cost, low-power devices that can replace existing 8-bit microcontrollers while still offering 32-bit performance. The Cortex-M1 has much of the same features as the Cortex-M0 but has been designed as a “soft core” to run inside a Field Programmable Gate Array (FPGA) device. The Cortex-M3 is the mainstay of the Cortex-M family and was the first Cortex-M variant to be launched. It has enabled a new generation of high-performance 32-bit microcontrollers which can be manufactured at a very low cost. Today, there are many Cortex-M3-based microcontrollers available from a wide variety of silicon manufacturers. This represents a seismic shift where Cortex-M-based microcontrollers are starting to replace the traditional 8-/16-bit microcontrollers and even other 32-bit microcontrollers. The next highest performing member of the Cortex-M family is the Cortex-M4. This has all the features of the Cortex-M3 and adds support for digital signal processing (DSP). The Cortex-M4 also includes hardware floating point support for single precision calculations. The Corex-M7 is the Cortex-M processor with the highest level of performance while still maintaining the Cortex-M programmers model. The Cortex-M7 has also been designed for use in high reliability and safety critical systems (Fig. 1.2).
image

Figure 1.2 The Cortex-M profile has five different variants with a common programmers model.
In the late 1990s, various manufacturers produced microcontrollers based on the ARM7 and ARM9 CPUs. While these microcontrollers were a huge leap in performance and competed in price with existing 8-/16-bit architectures, they were not always easy to use. A developer would first have to learn how to use the ARM CPU and then have to understand how a specific manufacturer had integrated the ARM CPU into their microcontroller system. If you have moved to another ARM-based microcontroller you might have gone through another learning curve of the microcontroller system before you could confidently start development. Cortex-M changes all that; it is a complete Microcontroller (MCU) architecture, not just a CPU core. It provides a standardized bus interface, debug architecture, CPU core, interrupt structure, power control, and memory protection. More importantly, each Cortex-M processor is the same across all manufacturers, so once you have learned to use one Cortex-M-based processor you can reuse this knowledge with any other manufacturers of Cortex-M microcontrollers. Also within the Cortex-M family, once you have learned the basics of how to use a Cortex-M3, then you can use this experience to develop using any other Cortex-M processor. Through this book, we will use the Cortex-M3 as a reference device and then look at the differences between Cortex-M3 and Cortex-M0, Cortex-M0+, and Cortex-M4. The Cortex-M7 has a more advanced memory system which introduces features such as Tightly Coupled Memories and Caches, we will take a detailed look at the Cortex-M7 separately so by the end of this book you will have a practical knowledge of all the Cortex-M processors.

Cortex-M3

Today, the Cortex-M3 is the most widely used of all the Cortex-M processors. This is partly because it has been available not only for the longest period of time but also it meets the requirements for a general-purpose microcontroller. This typically means it has a good balance between high performance, low-power consumption, and low cost (Fig. 1.3).
image

Figure 1.3 The Cortex-M3 was the first Cortex-M device available. It is a complete processor for a general-purpose microcontroller.
The heart of the Cortex-M3 is a high-performance 32-bit CPU. Like the ARM7 this is a reduced instruction set computer where most instructions will execute in a single cycle (Fig. 1.4).
image

Figure 1.4 The Cortex-M3 CPU has a three-stage pipeline with branch prediction.
This is partly made possible b...

Table of contents

  1. Cover image
  2. Title page
  3. Table of Contents
  4. Copyright
  5. Dedication
  6. Foreword
  7. Preface
  8. Acknowledgments
  9. Chapter 1. Introduction to the Cortex-M Processor Family
  10. Chapter 2. Developing Software for the Cortex-M Family
  11. Chapter 3. Cortex-M Architecture
  12. Chapter 4. Cortex Microcontroller Software Interface Standard
  13. Chapter 5. Advanced Architecture Features
  14. Chapter 6. Cortex-M7 Processor
  15. Chapter 7. Debugging with CoreSight
  16. Chapter 8. Practical DSP for Cortex-M4 and Cortex-M7
  17. Chapter 9. Cortex Microcontroller Software Interface Standard-Real-Time Operating System
  18. Chapter 10. RTOS Techniques
  19. Chapter 11. Test Driven Development
  20. Chapter 12. Software Components
  21. Chapter 13. ARMv8-M
  22. Appendix
  23. Index