Lusiak / Verma / Andrews | The Insider's Guide to Arm Cortex-M Development | E-Book | sack.de
E-Book

E-Book, Englisch, 276 Seiten

Lusiak / Verma / Andrews The Insider's Guide to Arm Cortex-M Development

Leverage embedded software development tools and examples to become an efficient Cortex-M developer
1. Auflage 2022
ISBN: 978-1-80324-113-5
Verlag: Packt Publishing
Format: EPUB
Kopierschutz: 0 - No protection

Leverage embedded software development tools and examples to become an efficient Cortex-M developer

E-Book, Englisch, 276 Seiten

ISBN: 978-1-80324-113-5
Verlag: Packt Publishing
Format: EPUB
Kopierschutz: 0 - No protection



Learn and implement the latest Arm Cortex-M microcontroller development concepts such as performance optimization, security, software reuse, machine learning, continuous integration, and cloud-based development from industry experts


Key Features


Learn how to select the best Cortex-M hardware, software, and tools for your project


Understand the use of key software components and how to optimize and develop modern applications


Get hands-on experience implementing quality software using example code provided in the book


Purchase of the print or Kindle book includes a free eBook in the PDF format


Book Description


Cortex-M has been around since 2004, so why a new book now? With new microcontrollers based on the Cortex-M55 and Cortex-M85 being introduced this year, Cortex-M continues to expand. New software concepts, such as standardized software reuse, have emerged alongside new topics including security and machine learning. Development methodologies have also significantly advanced, with more embedded development taking place in the cloud and increased levels of automation. Due to these advances, a single engineer can no longer understand an entire project and requires new skills to be successful.
This book provides a unique view of how to navigate and apply the latest concepts in microcontroller development. The book is split into two parts. First, you’ll be guided through how to select the ideal set of hardware, software, and tools for your specific project. Next, you’ll explore how to implement essential topics for modern embedded developers. Throughout the book, there are examples for you to learn by working with real Cortex-M devices with all software available on GitHub. You will gain experience with the small Cortex-M0+, the powerful Cortex-M55, and more Cortex-M processors.
By the end of this book, you’ll be able to practically apply modern Cortex-M software development concepts.


What you will learn


Familiarize yourself with heuristics to identify the right components for your Cortex-M project


Boot code to efficiently start up a Cortex-M device


Optimize algorithms with compilers, middleware, and other means


Get to grips with machine learning frameworks and implementation techniques


Understand security in the embedded space with solutions like TrustZone and TF-M


Explore cloud-based development methodologies to increase efficiency


Dive into continuous integration frameworks and best practices


Identify future trends that could impact Cortex-M software development


Who this book is for


This book is for practicing engineers and students working with embedded and IoT systems who want to quickly learn how to develop quality software for Arm Cortex-M processors without reading long technical manuals. If you’re looking for a book that explains C or assembly language programming for the purpose of creating a single application or mastering a type of programming such as digital signal processing algorithms, then this book is NOT for you. A basic understanding of embedded hardware and software, along with general C programming skills will assist with understanding the concepts covered in this book.

Lusiak / Verma / Andrews The Insider's Guide to Arm Cortex-M Development jetzt bestellen!

Weitere Infos & Material


1


Selecting the Right Hardware


It may be surprising that the first chapter of this book, which is written for Cortex-M software developers, is all about hardware. This is because software, in all its forms, is ultimately run on hardware. It is critical to understand which hardware capabilities exist to properly leverage them in software.

Additionally, you will likely need a development board for debugging your code during development. Some of you reading may even have a level of influence over which hardware is ultimately selected for your device. All in all, no matter what specific situation you are in, understanding what Cortex-M hardware is out there—and what it can do—will help you develop quality software for your current and future projects.

So, in this opening chapter, we will explain how to select Cortex-M hardware and provide an overview of where to find development boards. Note that we will be discussing both individual Cortex-M processors and Cortex-M development boards.

There are different ways to frame which Cortex-M hardware is best suited for your specific project. Examples can be helpful; the first section of this chapter lists common embedded/IoT use cases and presents Cortex-M processors that fit that situation. The side-by-side comparison is also helpful; the second section ranks processors by performance, power, and area metrics. The third section then focuses on development boards, discussing trade-offs.

The chapter ends by selecting two boards that will be used for hands-on examples in future chapters. In a nutshell, the topics we’ll discuss in this chapter are presented here:

  • Processor selection through use cases
  • Processor selection based on performance and power
  • Microcontroller development boards

Processor selection through use cases


IoT and machine learning (ML) applications are not only rapidly evolving and changing the way modern businesses operate but also transforming our everyday experiences. As these applications evolve and become more complex, it is essential to make the right hardware choices that meet application requirements. Ultimately, the processor choice comes down to the right balance of functionality, cost, power, and performance. Defining your use case and workload requirements makes determining this balance a lot simpler.

In this section, we will walk through the requirements of some common consumer embedded use cases and determine the Arm Cortex-M processor choices that are ideally suited. The list of use cases and the resulting processor selections are not exhaustive, mainly highlighting that if workload requirements are well understood, the processor decision-making process becomes much easier.

Medical wearable


Let’s start with a smart medical wearable use case. The requirements of this wearable include that it will be a wrist-worn device, with long battery life and special sensors to continuously monitor heart activity. Security is a vital requirement as the wearable stores private medical data. Processing power is equally important, operating within the size and power constraints of a battery-operated wearable.

For this case, the Arm Cortex-M33 processor provides an excellent combination of security, processing power, and power consumption. Cortex-M33 includes security features for hardware-enforced isolation, known as TrustZone for Cortex-M. It reduces the potential for attacks by creating isolation between the critical firmware and the rest of the application. The Cortex-M33 has many optional hardware features including a digital signal processing (DSP) extension, memory protection unit (MPU), and a floating-point unit (FPU) for handling compute-intensive operations. The Arm custom instruction and coprocessor interface in the Cortex-M33 provide the customization and extensibility to address processing power demands while still decreasing power consumption.

Note that these hardware features are optional; once manufactured and sold, these features are either present or not. Make sure to check whether the microcontroller or development board you are buying has these Arm Cortex-M processor features enabled if desired.

Industrial flow sensor


Let’s take another use case as an example. Say you’re designing an industrial flow sensor that will be used to measure liquids and gases with great accuracy. It needs to be extremely reliable and have a small form factor. The primary requirement is that it will be low-power and work with this accuracy standalone for very long periods of time. A great central processing unit (CPU) choice for designing such an industrial sensor is the Arm Cortex-M0+, which combines low power consumption and processing-power capabilities. It is the most energy-efficient Cortex-M processor with an extremely small silicon area, making it the perfect fit for such constrained embedded applications.

IoT sensor


There are several use cases in the embedded market that require demanding DSP workloads to be executed with maximized efficiency. With the advancements in IoT, there has been an explosion in the number of connected smart devices. There are so many different sensors connected within these devices to collect data for measuring temperature, motion, health, and vision. The sensor data collected is often noisy and requires DSP computation tasks—for example, applying filters to extract the clean data. The Cortex-M4, Cortex-M7, Cortex-M33, and Cortex-M55 processors come with a DSP hardware extension addressing various performance requirements for different signal-processing workloads. They also have an optional FPU that provides high-performance generic code processing in addition to the DSP capabilities. If your workload requires the highest DSP performance, the Cortex-M7 is a great choice. The Cortex-M7 is widely available in microcontrollers and offers high performance due to its six-stage dual-issue instruction pipeline. It is also highly flexible with optional instruction and data caches and tightly coupled memory (TCM), making it easy to select a processor that has been manufactured to meet your specific application needs. Security has become a common requirement for sensors on connected devices to provide protection from physical attacks. If security is an essential requirement for your sensor application in addition to DSP performance, then Cortex-M33 could be a great fit with its TrustZone hardware security features.

With some of the newer sensing and control use cases, we see a common need for not only signal processing but also ML inference on endpoint devices. ML workloads are typically very demanding in terms of computation and memory bandwidth requirements. The significant advancements made in ML via optimization techniques have now made it possible for ML solutions to be deployed on edge devices.

ML


The primary use cases for ML on edge devices today are keyword spotting, speech recognition, object detection, and object recognition. The list of ML use cases is rapidly evolving even as we write this book, with autonomous driving, language translation, and industrial anomaly detection. These use cases can be broadly classified into three categories, as outlined here:

  • Vibration and motion: Vibration and motion are used to analyze signals, monitor health, and assist with several industrial applications such as predictive maintenance and anomaly detection. For these applications, the installed sensors (generally accelerometers) are used to gather large amounts of data at various vibration levels. Signal processing is used to preprocess the signal data before any decision-making can be done using ML techniques.
  • Voice and sound: Voice applications are in several markets, and we’ve become quite familiar with voice assistants through the deployment of smart speakers. Many other voice-enabled solutions are coming to the mass market. The voice-capture process consists of one or several microphones used for voice keyword detection. Keyword spotting and automatic speech recognition are the primary demanding computing operations of these voice-enabled devices. These tasks require significant DSP and ML computation.
  • Vision: Vision applications are used in several areas for recognizing objects, being able to both sort and spot defects, and detecting movement. There is an increasing number of vision-based ML applications ranging from video doorbells and biometrics for face-unlocking to industrial anomaly detection.

Cortex-M processors ranging from the Cortex-M0 to the latest Cortex-M85 can run a broad range of these ML use cases at different performance points. Mapping the different workload performance needs and latency requirements of these use cases to the CPU’s feature capabilities greatly simplifies the process of hardware selection. The following diagram illustrates the range of ML use cases run on the Cortex-M family of processors today:

Figure 1.1 – ML on Cortex-M...



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.