Share this article:
Ask an Expert: Joseph Yiu
We asked Joseph Yiu, author of successful books on the Arm Cortex-M3, M4 and M0 processors, about the new Arm® Cortex®-M23 and Cortex-M33, and his new book entitled: Definitive Guide to Arm Cortex-M23 and Cortex-M33 Processors.
Why might an embedded systems engineer want to use Arm® Cortex®-M23 and Cortex-M33 over other Cortex-M processors?
The Arm Cortex-M23 and Cortex-M33 processors support several new features when compared to the previous generation of Cortex-M products. For example, they support an optional security feature called TrustZone®. By having this feature, security critical resources like secure data storage, cryptography accelerators and firmware update support can be isolated from normal applications that are running on the microcontroller devices – and are therefore protected if the applications are compromised. In Cortex-M23 and Cortex-M33 based microcontrollers with TrustZone support, security features are accessible through the use of secure firmware, which is usually preloaded on the chip. To use these security features, an application code just needs to call the APIs (Application Binary Interface) in the secure firmware, which will then enable the secure firmware to carry out the required operations.
Microcontroller systems utilizing TrustZone are more secure because even though hackers can compromise the normal application codes, they cannot directly access the secure information on the chip, or remotely modify the firmware. This arrangement also allows application developers to utilize the security features without needing to understand the IoT security details, thus enabling them to more quickly create secure IoT products.
In addition to TrustZone technology, the Cortex-M23 and Cortex-M33 processors support a range of features that were not available in previous Cortex-M processors. For example:
- The Cortex-M23 processor has a range of additional instructions (e.g., hardware divide) which are not available in the Cortex-M0 / Cortex-M0+ processors.
- The Cortex-M33 processor supports a coprocessor interface and the Arm Custom Instructions, which allows chip vendors to create and integrate closely coupled hardware accelerators in Cortex-M33 based devices.
In both processors, the maximum number of peripheral interrupts has also been increased when compared to previous generation products. Finally, there are improvements in performance. For example, the data processing performance of the Cortex-M33 is typically 10 to 20% better than the hugely popular Cortex-M4, and is designed with advanced power management features which help to deliver better energy efficiency.
The Cortex-M23 and M33 Processors are based on the Armv8-M architecture which replaced the Armv6-M and Armv7-M architectures. What were the reasons for moving to this architecture?
The key new feature in the Armv8-M architecture is the introduction of the TrustZone security extension, which I have already mentioned. This new feature was necessary because higher security was required for IoT devices. While the previous generation of Cortex-M processors already supported a Memory Protection Unit (MPU), it is not always sufficient because a vulnerability in privileged software, such as the OS, could still allow hackers to compromise an IoT device. With the advent of the IoT era, it was likely that a number of the devices could be deployed in vast numbers and, as a result, could become an attractive target for hackers. Even for an IoT product that does not contain much in the way of valuable data, millions of hacked IoT devices could be used by hackers to create a massive botnet to attack other IoT systems on the internet. The availability of TrustZone for Armv8-M, together with other security solutions from Arm (e.g. Trusted Firmware-M), makes such an attack much harder.
The TrustZone technology also provides a method for chip vendors to deliver value added software solutions on the chips, while protecting their software assets by locking down the secure side of the TrustZone system. Their customers developing software on the non-secure side can access the value-added software by calling the APIs, but are not able to reverse engineer the firmware code. The result of this capability and of the security benefits means that the TrustZone technology is highly welcomed by Arm partners.
What are the key features of the Armv8-M architecture?
The Armv8-M architecture is designed for microcontrollers, as well as for deeply embedded systems. For example, in many complex System-on-Chips (SoC) products, aside from the main application processors, there can be many other small Cortex-M processors inside – handling power management, real-time control for communication and audio interfaces, etc. To support all of these scenarios, the architecture is designed to be very flexible, making it possible to have tiny processors like the Cortex-M23, as well as feature rich microcontroller products based on the Cortex-M33 processors.
Another key feature of the Armv8-M architecture is its interrupt support. Using the Nested Vectored Interrupt Controller (NVIC) as specified in the architecture, the Cortex-M processors can deliver very fast interrupt response. Additionally, using NVIC for interrupt management is extremely easily. Ease-of-use is a key aspect of the Cortex-M processors: most of the time, software developers do not need an in-depth knowledge when using Cortex-M based microcontrollers to create their products. And because Armv8-M has various architectural features which support embedded operating systems (OS), most of the Real-Time OS can run “out of the box” on Cortex-M based devices without having to undertake lengthy software porting activities.
The Armv8-M architecture contains many enhancements when compared to previous generations. In addition to the TrustZone technology, Arm has also:
- redesigned the Memory Protection Unit (MPU) to make it easier to use, and
- introduced stack limit checking, which helps detect stack overflow errors.
Enhancements have also been made to the debug features. The Armv8-M architecture continues to evolve and during 2020 we announced the Cortex-M55 processor; which supports Helium® technology in Armv8.1-M, a vector extension which accelerate signal processing and machine learning applications.
What will the reader gain from reading your book, Definitive Guide to Arm Cortex-M23 and Cortex-M33 Processors?
Because many readers might not have used Arm Cortex-M processors before, this book is a good starting point for them to understand the architecture behind the Cortex-M processors. Although this book does not cover previous generations of the Cortex-M processor in great detail, I have highlighted throughout the book the differences between the Cortex-M23 and Cortex-M33 processor and the previous generation products.
While the Cortex-M23 and Cortex-M33 processors are designed to be very easy to use there will, no doubt, be times when software developers encounter technical issues when developing software and will, therefore, require a greater knowledge and understanding of the Armv8-M architecture in order to resolve the issues. This book covers various architecture topics in detail, which would help software developers in those situations. In addition, this book includes several software optimization topics which should help software developers improve their software.
What key tips can you give to an engineer deciding to use either the Cortex-M23 or M33 processors?
In the following cases, the use of Cortex-M33 would certainly be the preferred option:
- Where the project requires frequent floating-point calculations: The Cortex-M33 processor supports an optional floating-point unit (FPU) that helps process single precision floating-point data. When compared to the FPU in the Cortex-M4, the FPU in the Cortex-M33 supports more floating-point instructions and provides better performance.
- Where the project involves signal processing: The Cortex-M33 processor supports optional DSP instructions E.g., single cycle Multiply-Accumulate (MAC), Single Instruction Multiple Data (SIMD) and saturate arithmetic instructions.
In other cases, the decision could be more complex. In general, the Cortex-M33 processor has a higher performance than the Cortex-M23 due to its richer instruction set support and its Harvard bus architecture (meaning instruction and data access can be carried out in parallel). But the Cortex-M23 based microcontroller does have a lower power consumption. Device specific factors like peripheral features, memory sizes, chip packages and cost could all be factors an engineer needs to take into account when choosing which Cortex-M based device to use. To assist their decision, there are a range of low-cost development boards available on the market which enable engineers to try out the Cortex-M23 and Cortex-M33 based devices before making their final decision.
Ready to read this book?
Definitive Guide to Arm Cortex-M23 and Cortex-M33 Processors (9780128207352) is available now on ScienceDirect. Or purchase your own copy from the Elsevier bookstore and save 30% + get free shipping with promo code STC30.
Electronics & Electrical Engineering
Electronics and electrical engineering have practically limitless applications. From power engineering, telecommunications, and consumer electronics to circuit design, computer engineering, and embedded systems, these disciplines form the backbone of our increasingly tech-dependent world. Elsevier’s collection of electronics and electrical engineering content — particularly our Newnes and Academic Press Imprints — encompasses these areas and more. Our books and journals provide fundamental knowledge and practical, up-to-date toolkits for professional engineers and technicians, undergraduate and postgraduate students, and electronics enthusiasts.