Imagine your smart assistant at home: when you give a command, it can recognize your voice, process your speech, and respond. This is a case of a multi-sensor device that requires signal processing. Signal processing technology is crucial in all devices around us today: wearable devices, audio headsets, smart speakers, and cameras. We are witnessing an incredible growth of such autonomous, intelligent, and connected devices, and the challenge is that they must operate in a low-power environment.
To achieve signal processing capabilities, these applications previously used simple microcontrollers (MCUs) based on Arm Cortex-M0 or Cortex-M3 processors, along with separate proprietary digital signal processors (DSPs). However, we are now seeing more and more product manufacturers (or original equipment manufacturers – OEMs) turning to single high-performance, low-power MCUs with DSP extension capabilities, such as Cortex-M4, Cortex-M7, Cortex-M33, or Cortex-M35P processors, to replace the MCU + DSP design of two processors.Combining an Arm-based MCU with DSP instruction extension capabilities in a single processor has several advantages for OEMs, enabling them to:
Significantly save BoM costs by replacing two processors (MCU + additional DSP) with one.
Reduce system-level complexity by removing shared memory required for communication between the MCU and DSP, complex multi-processor bus architectures, and other associated logic requirements between the MCU and DSP.
Make it easier to develop and debug applications since all processes are centralized.
Reduce software development costs as a single compiler/debugger/IDE can support the entire project.
Save development time by leveraging Arm-optimized DSP library functionalities.
Benefit from programming in high-level languages (such as C or C++) instead of the manual assembly typically used for proprietary DSPs.
This blog will introduce the signal processing capabilities on the easy-to-use Arm Cortex-M processors and how to leverage software support provided by Arm ecosystem partners. I will also cover how the architecture of the processors efficiently implements algorithms and details of the free DSP library provided by Arm, including an example for cleaning ECG signal recordings from noise.Introduction to Signal ProcessingSignal processing algorithms are applied to raw data from analog-to-digital converters to shape the data to improve the decisions made by application software. Typical algorithms control the amplitude of signals, eliminate noise, or estimate oscillation frequencies.The key operations used for signal processing are based on a mathematical operation called discrete convolution. Convolution is created by the sum of products, so any processor capable of efficiently computing this product within a cycle will yield a sum of products that can be used for signal processing.Thirty years ago, the speed of processing 16-bit operands was limited to 10 million multiplications per second, and the address space was limited to a few dozen kBytes. Today, small Cortex-M3 devices can have synthesis frequencies exceeding 500 MHz. They can compute 32-bit multiplications, accumulate 64-bit, and have several GB of address space. Although the Cortex-M3 does not have DSP extensions, it can still perform signal processing. There are practically no limits to complex signal processing calculations using Cortex-M devices, and this blog will share some practical examples.Arm Embedded Processor PortfolioFirst, let’s take a look at the technologies offered by Arm and help you understand which technology is best suited for your application. You need hardware processing capabilities and efficiency that fit your application. The Arm Cortex processor series provides a standard architecture to meet the wide range of performance and cost requirements needed across these different product markets. The Arm Cortex series includes processors based on three different configurations:
Arm Cortex-A series processors, suitable for running mature, high-end applications on complex operating systems.
Arm Cortex-R series processors, suitable for high-performance real-time systems.
Arm Cortex-M series processors, suitable for low-power and cost-sensitive microcontroller applications.
Cortex-A and Cortex-R processors include NEON SIMD (Single Instruction, Multiple Data) extensions, which provide high-performance mathematical instructions for signal and data processing.Cortex-A and Cortex-R processors are widely used in signal processing applications. This blog focuses on the Cortex-M processor series, so let’s look at the advantages and performance points offered by Cortex-M processors. Here is a quick guide highlighting:
For the lowest power and area: Cortex-M0+ and Cortex-M23 processors.
For improved performance and efficiency: Cortex-M3, Cortex-M4, and Cortex-M33 processors.
High performance: Cortex-M7.
For anti-tampering security technologies: Cortex-M35P.
Arm Digital Signal Controllers with MCU and DSP Capabilities
Cortex-M4, Cortex-M7, Cortex-M33, and Cortex-M35P are digital signal controllers that meet the demand for high-performance general-purpose code processing as well as digital signal processing applications. These processors include DSP extensions to the Thumb instruction set and include optional floating-point units (FPUs). These instructions are designed to help improve the performance of numerical algorithms and provide the opportunity to execute signal processing operations directly on the CPU. As mentioned earlier, many years ago, you might have used Cortex-M3 for signal processing. However, these Cortex-M processors with DSP extensions provide better performance.
Why use Arm CPUs that combine control and DSP capabilities? A quick overview:
Ensure your signal processing algorithms can be ported from one processor to another – portability.
Leverage high processing power using integer or floating-point data formats – integer and floating-point calculations.
Benefit from the selection and flexibility offered by the signal processing partner network, which has expertise in voice, audio, motors, and machine learning – flexibility of signal processing partners.
Deploy security features – security.
Take full advantage of multi-source silicon supply while saving on software investments – cost savings.
Accelerate software development with the free signal processing kernel software library available on Arm GitHub – Arm free software library.
To start development based on Arm chips with DSP instruction extensions, check out Arm’s chip partners. For example, last year, NXP, STMicroelectronics, and Nordic Semiconductor announced the launch of DSP-enabled Cortex-M33-based chips.Accelerate software development using the free Arm signal processing kernel software libraryCMSIS-DSP and CMSIS-NN are software libraries optimized for general signal processing and mathematical function calculations for Cortex-M processors. The library is provided free as part of the CMSIS version and contains all source code. The functionalities included in the library are categorized as follows:
Neural network convolution, pooling, and activation functions.
Fully connected layer functions.
This library has separate functions for operating on 8-bit integers, 16-bit integers, 32-bit integers, and 32-bit floating-point values. You can use the CMSIS-DSP source code, modify it, distribute it, with no constraints.Example: ECG Filtering and DetectionThis is an example of signal processing applied to noise removal and signal detection on ECG recordings. A Cortex-M microcontroller samples electrocardiographic data at a rate of 500Hz. The data stream is processed through a noise removal algorithm (the upper wave in the figure below) and then purified through pulse detection (the middle wave in the figure below).Noise elimination suppresses low-frequency modulation of the AC power line and 60Hz interference. The detection algorithm finds peaks in the input stream through a sliding window and uses statistical estimation to determine the starting point of the cardiac cycle.The filter employs the following three poles (radians/amplitude): (0.05 [rad] / 0.98); (0.25 [rad] / 0.9); (0.45 [rad] / 0.97). The three zeros are arranged at different angles on the Z-circle, with angles of: 0.02 [rad], 0.65 [rad], and 1 [rad]. The filter gain is 0.02. The filter removes near-DC spectral components and noise around the frequency of the power line in the 50Hz ~ 60Hz range.When running on the Cortex-M3 processor, the CPU load for ECG signal processing is less than 0.1MHz. More specifically, processing a one-second signal through the cascade of three double second-order filters requires 55k cycles/second, while energy calculations and threshold detection require 15k cycles/second, which adds some implementation margin and time for buffer copying.DSP Introduction on Cortex-MThis blog aims to demonstrate the benefits of using Arm CPUs with combined control and DSP capabilities. As the market moves towards streaming, connectivity, and interactive user interfaces, the demand for performance in low-power embedded devices will continue to grow. Using a single microcontroller with DSP capabilities, instead of a lower-performance microcontroller with a separate DSP, can reduce BoM costs, system-level complexity, software development costs, and timelines.We expect more consumer devices to benefit from the high performance, low power, and low latency response of Cortex-M series processors like Cortex-M4, Cortex-M7, Cortex-M33, and Cortex-M35P. Combining these with Arm’s free software libraries can give a head start in DSP development.LongPressNoteUnlock more exciting dynamics