3 Advantages to using a Multicore Microcontroller

Several posts ago, I wrote about how two major trends for the 2020’s was going to be Python as a dominate language and machine learning at the edge. A third trend is that multicore microcontrollers are also going to dominate the industry. That’s right, while multicore has been a technology relegated to application processors and FPGA based applications, multicore microcontroller solutions are on the rise. Let’s examine three advantages that multicore microcontrollers have over traditional single core microcontrollers.

Advantage #1 – Balance Performance and Energy Consumption

The first advantage to using a multicore microcontroller is that it provides developers with additional methods for balancing performance and energy consumption. In a single core processor, developers mostly rely on low power modes or clock scaling to minimize energy consumption (although there are dozens of techniques that can be employed). A multicore solution allows a developer to have the performance that their device needs by enabling all the cores to perform at peak efficiency. When all that horsepower is not needed, cores can be turned off to save energy and maximize battery life.

Within the microcontroller domain, right now the typical multicore solutions are dual core implementations. The most common implementation is to pair a high-performance, feature rich processor like a Cortex-M4 or Cortex-M7 with a low-power Cortex-M0+ processor. This allows the low-power M0+ to handle low power states and when something needs to be done that requires processing such as GUI updates, running a machine learning inference, etc, then the M4 can be turned back on. This provides developers will several potential profiles for balancing performance and energy consumption.

Advantage #2 – Separation of Concerns (Domains)

The second advantage to using a multicore microcontroller is that it allows the application code to be broken up by separation of concerns or domains. There are currently three main domain categories that fit well for most applications but there certainly could be others. These three domains include:

  • Rich / Real-time execution
  • Secure / Non-secure
  • Application / Comms (Wi-Fi / BT)

In rich / real-time execution implementations, the application is broken up into two domains based on its timing requirement. Components that are supporting rich execution features such as graphical user interfaces will be located in one core, presumably a Cortex-M4/M7. Components that are supporting real-time requirements such as sensor acquisition and control would be located in the second core, presumably a Cortex-M0+.

In secure / non-secure implementations, the application is broken up not based on its execution needs but instead based on security concerns. A component that supports secure boot, cryptographic libraries, secure communications or some other secure feature would execute on one processor like a Cortex-M0+. Again, general application components would then execute from the other processor like a Cortex-M4/M7. The main benefit to this implementation is that the Cortex-M0+ acts as a secure processor and execution environment which is hardware isolated from the rest of the application.

In the application / comms implementation, one core is dedicated to specifically handle a communication stack. This stack could be a Wi-Fi stack, a Bluetooth stack, some other communication stack or maybe even a combination. The advantage here is that it makes it possible to have a microcontroller with integrated communication. The second core is then dedicated to the normal application code.

As you can see, these are several implementation where it makes a lot of sense to use a multicore microcontroller and in some instances, it may make sense to even have more than two cores!

Advantage #3 – Workload Distribution

The third and final advantage to using a multicore microcontroller is that it allows a development team to distribute the workload. There are actually two things I mean by this. First, we can distribute the workload for developing and maintaining the application amongst multiple developers or teams. We can have a core one application team and a core two application team. Each team then focuses on the application components for their core and obviously interacts with the second team on areas where there may be overlaps in concern or a need to carefully coordinate application behavior between the cores.

The second way we can distribute the workload is fairly obvious in that we can distribute our application workload across multiple processors. We can get truly concurrent application behavior because we have multiple cores. Don’t forget though that just like in a concurrent application that uses an RTOS, when we have concurrency with multiple cores, we can encounter interesting race conditions, timing problems, shared resource issues and other concurrent behavior issues. When separating the workload between the cores it’s important to be very careful what inter-processor communication methods are used.

Conclusions

Multicore microcontrollers undoubtedly provide development teams with many advantages to help them solve the problems with ever more complex systems. The ability to separate the application into areas of concerns or domains is currently a leading driver for adopting multicore microcontrollers. The ability to balance performance with energy consumption and distribute the workload are also major advantages when considering moving to a multicore solution. While there are only a few multicore microcontrollers currently on the market, over the next decade we will undoubtedly find them in ever increasing numbers in our designs.

Share >