Support for AI, IoT and More
Software for MCU-based systems faces many constraints that aren’t found outside the embedded realm. As a result, MCU vendors offer many kinds of software tools themselves or via partnerships with specialists.
For microcontroller (MCU)-based systems, code size and code efficiency are paramount concerns. Such systems must work with space-constrained program storage and require right-sized performance. As a result, MCU vendors offer a variety of software solutions themselves. Mostly provided for free, these tend not be replacements for the compressive development tool suites of embedded software development tools. Rather, they are software solutions geared toward either specific application areas or general advanced capabilities such as artificial intelligence (AI), the Internet of things (IoT) or advanced security.
Over the past 12 months, MCU vendors—either themselves or in partnership with specialist partner companies—have rolled out a wide variety of software packages to help embedded developers implement advanced capabilities into their device designs. The scope of this article concentrates only on such software solutions introduced by MCU vendors, and not on products from embedded software vendors.
GUI TOOLKIT
GUIs and interactive touchscreens provide intuitive user experiences in applications from robotic and machine controls to medical user interfaces, automotive instrumentation and home and building automation systems. Feeding such needs, in September, Microchip Technology announced a GUI development toolkit for its portfolio of 32 bit microprocessors running Linux, helping designers of industrial, medical, consumer and automotive graphical displays to reduce development cost and time-to-market.
Microchip’s Ensemble Graphics Toolkit is a free and open-source C++ GUI suite for the company’s SAMA5 and SAM9 series of Arm Cortex-A5 and ARM926EJ-S processor-based MPUs including the system-in-package and system-on-module products (Figure 1). The Ensemble Graphics Toolkit is optimized for Microchip’s 32-bit MPUs running the Linux operating system. By taking advantage of underlying hardware acceleration, including graphics controllers and video decoders when available, the toolkit provides a high-performance user experience on low and mid-range graphical displays up to XGA (1024 × 768 pixels) resolution.
Optimized code allows a smaller memory footprint, saving BOM costs. The efficient performance relative to other graphics solutions that rely on higher-performance cores and 3D graphical acceleration allows rich GUIs to be created for Microchip’s power-efficient MPUs. In addition, Ensemble Graphics Toolkit and Linux can be optimized for fast cold boot—with boot times of under three seconds from cold reset that is required for applications, such as automotive dashboard clusters.
Microchip’s Ensemble Graphics Toolkit suite is available without licensing or royalty fees to all developers of graphical interfaces. The Ensemble Graphics Toolkit is complementary to Microchip’s bare metal/RTOS-focused MPLABÒ Harmony Graphics Suite embedded software development framework that also follows a zero-cost, royalty-free model.
— ADVERTISMENT—
—Advertise Here—
The toolkit is fully integrated with Linux4SAM, Microchip’s mainline, Long Term Support (LTS) Linux offering. In addition to supporting Microchip’s MPU families, Linux4SAM contains driver support for a broad range of its components including the maXTouch family of touchscreen controllers, memory devices, power management and analog devices and wired and wireless networking components and modules. Linux4SAM is regularly updated and supports all Microchip MPUs throughout product life. Microchip’s Ensemble Graphics Toolkit is available at no cost and royalty free for all users and includes full support from Microchip [1]. It is based on the permissive Apache 2.0 open-source license.
AI FOR INDUSTRIAL CONTROL
It wasn’t that long ago that the world of AI and the world of MCUs were lightyears apart. Today, embedded AI technology has evolved to where MCU-based AI is possible. Smoothing that path, in October, Octonion, a software company specializing in AI at the Edge for industrial-equipment diagnosis, announced an STM32Cube expansion package (Figure 2), optimized for STM32L4+ MCU-based industrial-application development boards from STMicroelectronics (ST).
Octonion’s software package supports ST’s efforts to develop AI-based applications running on STM32 MCUs and microprocessors in the fast-growing condition-based-monitoring and predictive-maintenance segments. The Octonion I-CUBE-OCTMI package delivers a self-care system running on STM32 ultra-low power MCUs and powered by Octonion’s Edge AI engine that automatically learns, inspects and monitors the health of industrial equipment throughout its operating life.
The expansion pack is optimized for the STM32L4+ development boards, which include a range of ST’s industrial-grade sensors and connectivity features, starting from the STWIN SensorTile Wireless Industrial Node. It embeds Octonion’s AI engine operating in an unsupervised mode, continuously analyzing data from an accelerometer to handle vibration analysis for condition monitoring and predictive maintenance.
The engine does not require any prior knowledge of the equipment or existing dataset. It learns operational modes locally on the MCU to fine-tune the embedded Octonion Machine Intelligence algorithm. With all the computation done at the Edge, there are no data sent outside, eliminating possible privacy issues.
The I-CUBE-OCTMI expansion pack gives developers access to two ready-to-use algorithms: Instant Analyser for fast-response equipment-health analysis and Wize Analyzer designed for equipment with frequent operational-mode changes. The expansion pack covers a wide range of industrial machines’ behaviors allowing it to detect spike anomalies and extended dynamic state anomalies on motors of various power classes, including small BLDC, PMSM motors, or huge turbines. The I-CUBE-OCTMI is available under commercial license with free usage for evaluation and non-commercial purposes [2].
COMPREHENSIVE PACKAGE
For its part, Renesas Electronics offers a software package that targets a wide set of applications. Last Spring, the company rolled out an update of its Flexible Software Package (FSP) for the Renesas RA Family of 32-bit Arm Cortex-M MCUs. The FSP version 1.0 added new security and connectivity features, advanced neural network, machine learning and motor control capabilities, as well as enhanced compiler, debugger and development environments. According to Renesas, the security and connectivity enhancements permit developers to quickly create compelling and secure IoT endpoint and edge solutions for Industry 4.0, building automation, metering, healthcare, consumer wearable and home appliance applications.
Now at version 2.2.0, FSP is well suited for users that want a flexible and open architecture. Embedded developers can re-use their legacy code or combine it with valuable software examples from Renesas that help speed implementation of complex connectivity and security solutions (Figure 3). The FSP comes with FreeRTOS and can be replaced with any other RTOS or middleware to meet each developer’s requirements. Developers can choose the software model that best suits their needs while utilizing Renesas’ extensive line-up of RA 32-bit MCUs.
FSP provides security and connectivity features that enable complete chip-to-cloud connections. The publicly available source code includes middleware stacks to support secure connections with all major cloud providers, including Amazon Web Services, Microsoft Azure, Google Cloud Platform and any third-party MQTT broker. New security features include secure key generation and persistent encrypted key storage, hardware acceleration for AES, SHA-2, RSA 2K, NIST and Brainpool elliptic curve cryptography, as well as secured MQTT connections over TLS.
— ADVERTISMENT—
—Advertise Here—
FSP also includes neural network, machine learning and motor control support. Arm CMSIS-NN libraries are available and can be combined with new motor control features, such as a three-phase general-purpose PWM timer (GPT) and a port output enabled GPT to create a predictive maintenance support solution.
Development tools, including compilers and integrated development environments (IDE) have also been updated and now support Renesas e2 studio, Arm Keil MDK, and IAR Embedded Workbench for Arm. The RA Family Smart Configurator (RA SC) enables seamless FSP integration with third-party IDEs and compilers. Support for Renesas E2 emulator and E2 emulator Lite debugging emulators and flash programmers has been added to the current debugging suite, which includes SEGGER J-Link.
BUILDING AUTOMATION TOOLS
Demand for Smart Building technologies has ramped up quickly in recent years. Part of that puzzle are numerous low-power, wireless subsystems, typically MCU-based. In September, ST addressed those needs with the release of its KNX software for the S2-LP ultra-low-power radio transceiver to enable energy-saving standardized wireless connectivity for smart-building controls (Figure 4).
Ready to run on an STM32 MCU or alternatively on a BlueNRG-2 Bluetooth Low Energy System-on-Chip (SoC) that embeds an Arm Cortex-M0 core running at 32MHz and a comprehensive set of I/O peripherals, the software contains a certified KNX-RF stack, RF adaptation layer and S2-LP library needed to connect the transceiver to create an ultra-low-power wireless KNX node. Operating in the 868.3MHz band at only 10mA with +10dBm output, the S2-LP delivers energy efficient, secure and robust wireless connectivity prolonging battery run-time and reducing the overall cost of the solution.
Combining the S2-LP radio and BlueNRG-2 SoC enables a unique hybrid and low-power optimized KNX/Bluetooth solution in two chips, allowing a smartphone to access KNX-based networks and provide an intuitive and stylish interface for conveniently monitoring, controlling, configuring, provisioning and updating the KNX nodes.
Whether hosted on the BlueNRG-2 or STM32 MCU, ST’s KNX-RF software enables innovation and power savings for push-buttons, light switches, occupancy sensors, roller-shutter controls, dimmer actuators and other devices for lighting, heating, HVAC and energy-harvesting systems. The software meets the latest KNX-RF Multi specification, which supports secure (S mode), encrypted communications and frequency agility with five channels to help avoid interference and permit fast and slow communication modes to save power.
Further features of KNX-RF Multi boost reliability and allow larger numbers of KNX devices to coexist on the network, including listen before talk (LBT), fast acknowledge with auto-retry, and support for repeaters. To create the new KNX-RF Multi software, ST teamed with its Authorized Partners, Tapko for the certified KNX stack and Actimage for the RF adaptation layer.
MACHINE-LEARNING SOLUTION
Machine learning is another technology that’s new finding its way down at the MCU-level. Offering a solution in that arena, last Summer NXP released its eIQ Machine Learning software support for the Glow neural network (NN) compiler, delivering the first NN compiler implementation for higher performance with low memory footprint on NXP’s i.MX RT crossover MCUs. The Glow Neural Network compiler is particularly suited for vision- and voice-based machine learning applications (Figure 5).
Developed by Facebook, Glow can integrate target-specific optimizations, and NXP leveraged this ability using NN operator libraries for Arm Cortex-M cores and the Cadence Tensilica HiFi 4 DSP, maximizing the inferencing performance of its i.MX RT685 and i.MX RT1050 and RT1060. This capability is merged into NXP’s eIQ Machine Learning Software Development Environment, freely available within NXP’s MCUXpresso SDK.
Facebook introduced Glow (the Graph Lowering NN compiler) in May 2018 as an open-source community project, with the goal of providing optimizations to accelerate NN performance on a range of hardware platforms. As an NN compiler, Glow takes in an unoptimized NN and generates highly optimized code. This differs from the typical NN model processing whereby a just-in-time compilation is leveraged, which demands more performance and adds memory overhead. Directly running optimized code, like that possible with Glow, greatly reduces the processing and memory requirements. NXP says it has also taken an active role within the Glow open-source community to help drive broad acceptance of new Glow features.
NXP’s edge intelligence environment solution for machine learning is a comprehensive toolkit that provides the building blocks that developers need to efficiently implement machine learning in edge devices. NXP’s eIQ now includes inferencing support for both Glow and TensorFlow Lite, for which NXP routinely performs benchmarking activities to measure performance. MCU benchmarks include standard NN models, such as CIFAR-10. Using a CIFAR-10 model as an example, the benchmark data acquired by NXP shows how to leverage the performance advantage of the i.MX RT1060 device (with 600MHz Arm Cortex-M7), i.MX RT1170 device (with 1GHz Arm Cortex-M7) and i.MX RT685 device (with 600 MHz Cadence Tensilica HiFi 4 DSP).
NXP’s enablement for Glow is tightly coupled with the Neural Network Library (NNLib) that Cadence provides for its Tensilica HiFi 4 DSP delivering 4.8GMACs of performance. In the same CIFAR-10 example, NXP’s implementation of Glow achieves a 25x performance advantage by using this DSP to accelerate the NN operations.
HOMEKIT FOR ESP MCUs
HomeKit is a framework developed by Apple for communicating with iOS devices, and controlling connected accessories in a user’s smart home. Last year Espressif released a port of Apple’s HomeKit Accessory Development Kit (ADK), so that developers could build non-commercial HomeKit accessories on ESP32 and ESP32-S2 chips. In October, Espressif announced that its implementation of HomeKit, the ESP HomeKit SDK, can work on its ESP8266 MCU too.
In the same announcement, the company released that the ESP HomeKit SDK is now also opened up on GitHub [3], offering APIs with a great level of usability, as well as multiple examples, including how to make an ESP HomeKit bridge, outlet fan or light bulb. The available documentation can help even beginners to experiment with ready-made examples of how to get started. Figure 6 shows an excerpt from Espressif’s “Getting-Started Guide for Developers” in the ESP HomeKit SDK.
The ESP HomeKit SDK ensures easy integration with other ESP-IDF components, such as Unified Provisioning, which is supported by default. Additionally, Espressif has also integrated ESP RainMaker with the ESP HomeKit SDK, so that you can now control your devices with Alexa, Google Assistant as well as Siri.
— ADVERTISMENT—
—Advertise Here—
More specifically, an example firmware can demonstrate a switch in which HomeKit is integrated. The firmware runs on an ESP32-S2-Saola-1 board, and uses the RGB LED and the BOOT button to show and change the switch status. A green LED indicates that the switch is on. When pressed, the BOOT button will toggle the state of the switch to OFF (and the LED to red). A subsequent press will turn the switch ON again. The phone app will also reflect this status. Once the board is set up, it can also be paired from the iOS Home App. The details about this integration example are available at reference [4].
SOLUTION FOR MCU IoT SECURITY
Some of the software innovations delivered by MCU vendors come bundled with releases of MCU products. In an example tackling IoT security, in October, Infineon Technologies introduced an MCU/software solution designed to help IoT device makers reduce firmware development risks and accelerate time-to-market with a highly integrated IoT lifecycle management solution.
The solution combines the PSoC 64 Secure MCUs with Trusted Firmware-M embedded security, the Arm Mbed IoT OS and the Arm Pelion IoT platform (Figure 7). The Pelion-Ready and Mbed OS-Enabled solution demonstrates industry best practices for security, by reaching PSA Certified Level 1. Through the acquisition of Cypress Semiconductor, the PSoC 64 secure MCU line is now part of Infineon’s product line.
According to Infineon, studies have shown that a major barrier to consumer adoption of IoT products stems from concerns over privacy and security. Infineon’s IoT lifecycle management solution makes it easier for device manufacturers to connect, manage and update their products by integrating state-of-the-art security with open-source firmware.
Implementing Trusted Firmware-M with PSoC 64 significantly simplifies device security implementation. The open-source software delivers configurable components that enable PSA Functional APIs and create a Secure Processing Environment (SPE) for Arm Cortex -M-based MCUs. The PSoC 64 root of trust makes it easier for IoT device makers to achieve PSA Certified for their end products.
The Pelion Device Management offers secured device management at every product lifecycle stage, from provisioning to decommissioning. It incorporates a dual-core architecture, with an Arm Cortex-M4 core to run applications and an Arm Cortex-M0+ core used as a security coprocessor with a pre-configured root-of-trust.
PSoC 64 is part of the Infineon’s IoT-AdvantEdge solution: a comprehensive set of building blocks that enables IoT products to get to market faster and more cost effectively. IoT-AdvantEdge simplifies the design experience by providing connectivity combined with security and local processing in an integrated solution.
RESOURCES
References:
[1] Microchip’s Ensemble Graphics Toolkit is available at no cost and royalty free for all users and includes full support from Microchip. It is based on the permissive Apache 2.0 open-source license. Training and support are available worldwide at www.microchip.com/EGT
[2] The I-CUBE-OCTMI is available under commercial license with free usage for evaluation and non-commercial purposes. https://intelligence.octonion.com/st-expansion
[3] Espressif Github https://github.com/espressif/esp-homekit-sdk
[4] ESP HomeKit SDK integration example: https://github.com/espressif/esp-rainmaker/tree/master/examples/homekit_switch
Espressif Systems | www.espressif.com
Infineon Technologies | www.infineon.com
Microchip Technology | www.microchip.com
NXP Semiconductors | www.nxp.com
Octonion | www.octonion.com
Renesas Electronics | www.renesas.com
ST Microelectronics | www.st.com
PUBLISHED IN CIRCUIT CELLAR MAGAZINE • FEBRUARY 2021 #367 – Get a PDF of the issue
Sponsor this ArticleJeff served as Editor-in-Chief for both LinuxGizmos.com and its sister publication, Circuit Cellar magazine 6/2017—3/2022. In nearly three decades of covering the embedded electronics and computing industry, Jeff has also held senior editorial positions at EE Times, Computer Design, Electronic Design, Embedded Systems Development, and COTS Journal. His knowledge spans a broad range of electronics and computing topics, including CPUs, MCUs, memory, storage, graphics, power supplies, software development, and real-time OSes.