Multicore microcontrollers are starting to become popular among embedded systems designers. Designers can leverage multiple cores by breaking their applications up into separate application (execution) domains. Each domain then has a dedicated function to fulfill in the system. While multiple cores have been used in safety-critical applications for some time, there are several additional use cases that I’m finding are becoming more popular as the cost for multicore microcontrollers decreases and availability increases. In this post, we will examine the three most common use cases.
Use Case #1 – Real-time Control
The first, and perhaps the most popular use case, is to use a multicore microcontroller to split the application into two separate real-time application domains. In these applications, developers may have two sets of real-time requirements that are competing. For example, an IoT device may need to sample a bunch of sensors while simultaneously transmitting sensor data to the cloud. A battery-operated device would be trying to minimize the CPU horsepower, which could result in conflicts between the connectivity stacks and sensor acquisition tasks. One potential solution is to put connectivity in one core while the sensor and other activities are performed in the other core. (This is what the ESP32 modules do).
(Image Source: STM32H7 MCUs for rich and complex applications, Slide 29)
Another example would be where the applications require motor control, sensor acquisition, data storage, and a graphical user interface, like the image above. Embedded GUI applications often utilize a large amount of memory and are CPU intensive. Separating those operations to one core and then having the other core perform the primary application functions is another example.
Use Case #2 – Hardware-based Isolation for Security
The second, and one of my favorites, use case for multicore microcontrollers is in security applications. One tenant for developing a secure application is to have hardware-based isolation. The idea is to have two execution domains: a secure processing environment (SPE) and a nonsecure processing environment (NSPE).
Some single-core microcontrollers use Arm TrustZone® to create hardware-based isolation. The transition does utilize up to three clock cycles to switch execution domains. What’s cool about multicore processors is that you can dedicate one core to SPE and the other to NSPE. There is no need to switch back and forth between execution domains because each core is a dedicated execution domain! This also allows the NSPE and the SPE to run in parallel. Cryptographic operations can run while a display is updated for the user. An example can be seen below:
(Image Source: STM32H7 MCUs for rich and complex applications, slide 28)
At the moment, this is perhaps the most potent use case for multicore microcontrollers, although there are undoubtedly many others that are growing in popularity.
Use Case #3 – Machine Learning and Real-time Control
The final use case that we will discuss today for multicore microcontrollers is when we separate machine learning inferences from the real-time control application domain. Just like with real-time use cases, we want to keep the pieces of the real-time application in a core all on their own so that they can meet their real-time requirements. Then, we can run a machine learning inference in the other core, which is often a CPU-intensive operation. An example can be seen in the image below:
(Image Source: STM32H7 MCUs for rich and complex applications, Slide 16)
As machine learning finds its way into more embedded applications, it will become more critical to break the embedded applications into multiple application domains and run those applications across multiple cores.
Multicore Microcontrollers Conclusion
Leveraging multicore microcontrollers is an exciting solution for many design problems that are facing embedded systems developers. The solution allows developers to break their applications into multiple application domains that operate independently but still share data and resources. As a result, multiple cores can be used to improve device energy consumption and maximize on-chip resources. Numerous application domains also make breaking the problem up easier and allowing multiple teams or developers to work on the application simultaneously.