DigiKey-eMag-EdgeAI-Vol 18

Why and how to get started with multicore microcontrollers for IoT devices at the Edge

IoT developers are interested in multicore microcontrollers because they allow them to separate their application into multiple execution domains. Separate execution domains allow precise control of the application’s performance, features, and power needs. For example, one core may be used to interact with a user through a high- resolution display and touch panel, while the second core is used manage the real-time requirements of the system such as controlling a motor, relays and sampling sensors. There are many ways that a developer can partition their application, but the two biggest paradigms are to separate the application into: ■ Feature rich/real-time ■ Real-time/secure In the first paradigm, feature rich/ real-time, the system is exactly like the one described in the paragraph above. Feature rich application components, such as the display, ML inferences, audio playback, and memory storage, among others, are all handled by one core. The second core then handles real-time functions such as motor control, sensing, and communication stacks (Figure 1). The second paradigm separates the application into real-time and secure functionality. In the first core, the application may handle things like the display, memory access, and real-time audio

multicore microcontrollers, it’s best to select a development board that has the following characteristics: ■ Includes an LCD for feature rich application exploration ■ Expansion I/O ■ Is low cost ■ Has a well proven ecosystem behind it including example code, community forums, and access to knowledgeable FAEs Let’s look at several examples from STMicroelectronics, starting with the STM32H745I-DISCO (Figure 3). This board is based on the STM32H745ZIT6 dual core microcontroller that comprises an Arm Cortex-M7 core running at 480 megahertz (MHz) and a second Arm Cortex-M4 processor running at 240 MHz. The part includes a double-precision floating point unit and an L1 cache with 16 kilobytes (Kbytes) of data and 16 Kbytes of instruction cache. The discovery board is particularly interesting because it includes additional capabilities such as: ■ An SAI audio codec ■ A microelectromechanical systems (MEMS) microphone ■ On-board QUAD SPI flash ■ 4 gigabyte (Gbyte) eMMC ■ Daughterboard expansion ■ Ethernet ■ Headers for audio and headphones

start experimenting with multicore microcontrollers and really scale up an application. For developers who are looking for a development board that has additional capabilities and far more expansion I/O, the STM32H757I- EVAL may be a better fit (Figure 4). The STM32H757I-EVAL includes additional capabilities over the evaluation board such as: ■ 8 M x 32-bit SRAM ■ 1 Gbit twin quad SPI NOR flash ■ Embedded trace macrocell (ETM) for instruction tracing ■ Potentiometer ■ LEDs ■ Buttons (tamper, joystick, wake- up) These extra capabilities, especially the I/O expansion, can be extremely useful to developers looking to get started.

Figure 1: One paradigm for application design with multicore microcontrollers is to place the feature rich application components in one core and the real-time components in the second core. Image source: STMicroelectronics

Figure 3: The STM32H745I-DISCO board integrates a wide range of on-board sensors and memory capabilities that allow developers to test out the dual core microcontrollers running at 480 MHz and 240 MHz. Image source: STMicroelectronics playback. The second core, on the other hand, may do nothing more than act as a security processor. As such, the second core would handle storage of critical data like device and network keys, handle encryption, secure bootloader, and any other features deemed to fall within the secure software category (Figure 2).

energy constraints. Several multicore microcontrollers from STMicroelectronics’ STM32H7 line will be introduced by way of example. The article will also examine several use cases where developers can leverage multicore processing and split the workload between multiple cores. Introduction to multicore microcontrollers As mentioned, multicore microcontrollers have more than one processing core. There are

two types of configurations which are often used, symmetric and asymmetric processing. Symmetric core configurations contain two or more of the exact same processing cores. For example, they might both be Arm Cortex-M4 processors. Asymmetric cores on the other hand may contain an Arm Cortex-M7 processor and an Arm Cortex-M4 processor. They could also contain an Arm Cortex-M4 and an Arm Cortex-M0+ processor. The combinations are many and depend upon application and design requirements.

Having looked at several development boards, the next step is to outline some recommendations for getting started with a multicore microcontroller application.

There are other potential ways to parse up a multicore

microcontrollers’ application space, but these two paradigms seem to be the most popular among IoT developers.

Figure 4: The STM32H757I-EVAL board provides developers with lots of expansion space, easy access to peripherals, and an LCD screen to get started with multicore applications. Image source: STMicroelectronics

Selecting a multicore microcontroller development board

While multicore microcontrollers are becoming very popular, they are still not quite mainstream and selecting one can be tricky. For a developer looking to work with

The development board has a lot of built-in capabilities that make it extremely easy to

Figure 2: Another paradigm for application design with multicore microcontrollers is to place the real-time application components in one core and all the security components in a second core. Image source: STMicroelectronics

we get technical

14

15

Powered by