Summary
gaiyao
There are now 8 processor members in the ARM Cortex-M processor family. In this article, we will compare the product features among the Cortex-M series processors, focusing on how to choose the right Cortex-M processor based on product applications. This article will detail the instruction sets of the Cortex-M series processors and their advanced interrupt handling capabilities, as well as the comparison of SoC system-level features, debugging, tracing functions, and performance.
1 Introduction
Today, the ARM Cortex-M processor family has 8 processor members. In addition, ARM’s product line has many other processor members. For many beginners, and even for some chip designers who are experienced but not familiar with ARM series processors, it can be easy to confuse these products. Different ARM processors have different instruction sets, system functions, and performance. This article will deeply showcase the key differences among the Cortex-M series processors and how they differ from other ARM processor series.
1.1 ARM Processor Family
Over the years, ARM has developed quite a number of different processor products. As shown in the figure below (Figure 1): ARM processor products are divided into the classic ARM processor series and the latest Cortex processor series. Depending on the application range, ARM processors can be classified into three series.
Application Processors – High-end processors aimed at mobile computing, smartphones, servers, and other markets. These processors operate at very high clock frequencies (over 1GHz) and support memory management units (MMU) required by full operating systems such as Linux, Android, MS Windows, and mobile operating systems. If the planned product needs to run one of the above operating systems, you need to choose an ARM application processor.
Real-time Processors – A high-performance processor series aimed at real-time applications, such as disk controllers, automotive transmission systems, and baseband control for wireless communications. Most real-time processors do not support MMUs but typically have MPUs, Cache, and other memory functions designed for industrial applications. Real-time processors operate at relatively high clock frequencies (e.g., 200MHz to >1GHz) with very low response latency. Although real-time processors cannot run the full versions of Linux and Windows operating systems, they support a wide range of real-time operating systems (RTOS).
Microcontroller Processors – Microcontroller processors are typically designed to be very small and energy-efficient. These processors usually have short pipelines and low maximum clock frequencies (although there are processors on the market that can operate above 200MHz). Additionally, the new Cortex-M processor family is designed to be very easy to use. Therefore, ARM microcontroller processors are very successful and popular in the microcontroller and deeply embedded systems market.
Table 1 summarizes the main features of the three processor series.
Table 1: Summary of Processor Characteristics
1.2 Cortex-M Processor Family
The Cortex-M processor family focuses more on the low-performance end, but these processors are still quite powerful compared to many traditional processors used in microcontrollers. For example, the Cortex-M4 and Cortex-M7 processors are used in many high-performance microcontroller products, with maximum clock frequencies reaching up to 400MHz.
Of course, performance is not the only criterion for choosing a processor. In many applications, low power consumption and cost are key selection criteria. Therefore, the Cortex-M processor family includes various products to meet different needs:
Unlike the older classic ARM processors (e.g., ARM7TDMI, ARM9), the Cortex-M processors have a very different architecture. For example:
– Only supports ARM Thumb® instructions, extended to support both 16-bit and 32-bit instructions in the Thumb-2 version.
– Built-in nested vector interrupt controller responsible for interrupt handling, automatically managing interrupt priority, interrupt masking, nested interrupts, and system exception handling.
– Interrupt handler functions can be programmed using standard C language, and the nested interrupt handling mechanism avoids the need for software to determine which interrupt needs to be handled. At the same time, the interrupt response speed is deterministic and low-latency.
– The vector table changes from jump instructions to the starting addresses of interrupt and system exception handler functions.
– The register set and some programming modes have also changed.
These changes mean that much of the assembly code written for classic ARM processors needs to be modified, and old projects need to be updated and recompiled to migrate to Cortex-M products. The specific details of software porting are documented in ARM documentation:
ARM Cortex-M3 Processor Software Development for ARM7TDMI Processor Programmers
http://www.arm.com/files/pdf/Cortex-M3_programming_for_ARM7_developers.pdf
1.3 Common Features of Cortex-M Series Processors
There are many similarities among Cortex-M0, M0+, M3, M4, and M7, such as:
– Basic programming model (Section 3.1) – Interrupt response management of the nested vector interrupt controller (NVIC) – Sleep modes designed in the architecture: Sleep mode and Deep Sleep mode (Section 4.1) – Operating system support features (Section 3.3) – Debugging functions (Section 6) – Ease of use, such as the built-in nested vector interrupt controller
Figure 2: Nested Vector Interrupt Controller of Cortex-M Processors
Supports interrupt inputs from many peripheral devices, a non-maskable interrupt request, an interrupt request from the built-in clock (SysTick) (see Section 3.3), and a certain number of system exception requests. NVIC manages the prioritization and masking of these interrupts and exceptions. More details on NVIC and the exception handling model are described in Section 3.2. Other similarities and differences between Cortex-M processors will be discussed in the remainder of this article.