Home Articles How to quickly prototype IoT devices with the B-L4S5I-IOT01A IoT node...

How to quickly prototype IoT devices with the B-L4S5I-IOT01A IoT Node Discovery Kit

arm cortex processor
Figure 1: The B-L4S5I-IOT01A is based on an Arm Cortex-M4 processor running at up to 120 MHz with 2 Mbytes of flash memory, 640 Kbytes of RAM, wireless connectivity, and multiple sensors. (Image source: STMicroelectronics)

As devices become more and more connected to the Internet of Things (IoT), developers starting from scratch realize that it's still not as easy as you might expect, especially with tight timelines and tight costs. limited. From choosing a trusted, secure, and well-supported development environment to selecting compatible software and hardware, it turns out that designing and building an IoT device still requires a wide range of skills.

What developers increasingly need is easy access to secure solutions, cloud connectivity libraries, an RTOS, and a compatible hardware and software development platform that provides easily integrated sensors, all in a scalable package.

This article discusses how IoT designers can rapidly prototype their products using the B-L4S5I-IOT01A IoT node Discovery Kit from STMicroelectronics. It examines the capabilities of the embedded microcontroller, the plethora of sensors and configuration options, and how to connect to Amazon Web Services (AWS) and quickly start building your prototype and final product.

Introduction to IoT Node B-L4S5I-IOT01A Discovery Kit

The B-L4S5I-IOT01A Discovery board is an all-in-one development board that can be used to prototype almost any embedded IoT device (Figure 1). The board has enough processing power, sensors, and expandability to make any embedded developer dream of the applications it could create. The B-L4S5I-IOT01A board is based on the low power Arm® Cortex®-M4 processor running at 120 megahertz (MHz), supported by 2 megabytes (Mbytes) of program flash and 640 kilobytes (Kbytes) of SRAM. The STM32L4S5VIT6 also has features ideal for IoT applications, such as:

  • A floating point unit (FPU)
  • A 14-channel Dynamic Memory Access (DMA) controller
  • An AES and HASH encryption hardware accelerator
  • Advanced graphics features
  • An energy benchmark score of 233 ULPMark CP

Processing power and energy efficiency alone do not make a great rapid prototyping platform. The discovery board also includes wireless connectivity in the form of an 802.11b/g/n compliant Wi-Fi module (ISM43362-M3G-L44) from Inventek Systems and a Bluetooth 4.1 module from STMicroelectronics, as well as a number of sensors. These include two MP34DT01 digital omnidirectional microphones, an HTS221 digital capacitive sensor for relative humidity and temperature, and a LIS3MDL high-performance three-axis magnetometer.

The list above is by no means exhaustive - you can find a more detailed description here. Next, it's important to examine the tools and software stacks available to speed up development.

The STM32 ecosystem

The ecosystem surrounding any development board determines whether or not a team can create a rapid prototype. For example, to prototype an IoT device with the B-L4S5I-IOT01A, developers need access to a compiler, integrated development environment (IDE), driver libraries, configuration tools, and firmware upgrade software. The Discovery B-L4S5I-IOT01A board supports all of these needs.

Many developers use Eclipse and the GNU C compiler as their development environment. STMicroelectronics provides a free tool, STM32CubeIDE (Figure 2), that allows developers to write and build their software projects. STM32CubeIDE provides access from various perspectives to a software development environment, a microcontroller configuration tool, and a debugging environment.

iot device
Figure 2: STM32CubeIDE provides developers with an IDE to create, configure, and manage embedded software for their IoT device. (Image source: Beningo Embedded Group)

STM32CubeIDE not only provides a way to create, build and manage software projects, but also has an interface to STM32CubeMx. STM32CubeMx is a microcontroller configuration tool that allows developers to configure clock trees, peripherals, sensors, and middleware. Developers configure their settings, and then the toolchain generates drivers and configuration files, drastically reducing development time and helping developers focus on their application code, not the infrastructure standard.

Beyond configuring and deploying a code base, the STM32 ecosystem comes with several useful tools for developers working on the cutting edge. For example, developers who want to take advantage of machine learning in their applications can use the X-CUBE-AI extension to STM32Cube.AI, which provides teams with a simplified framework for converting, validating, and running inferences on the STM32. For example, developers can train a model using TensorFlow Lite and then convert the model in minutes to C code that runs on the microcontroller. In addition, there are extension packs with ready-to-run software including:

  • FP-AI-FACEREC for facial recognition applications
  • FP-AI-NANOEDG1 for condition monitoring applications
  • FP-AI-VISION1 for image classification applications
  • FP-AI-SENSING1 for audio applications and scene classification

Every IoT device must have security in mind, even during the rapid prototyping phase. Today's web is littered with relentless attacks, security breaches, and exploitation of company and customer data. Therefore, any rapid prototyping platform must have the ability to scale to a production system efficiently. The discovery board can take advantage of STMicroelectronics Secure Boot Software Stacks (SBSFU) to provide developers with this capability. SBSFU is available in the X-CUBE-SBSFU function package, which provides:

  • Root of Trust (RoT) Services
  • Secure key management services
  • cryptographic schemes
  • Secure Firmware Update Services

The ecosystem surrounding the B-L4S5I-IOT01A Discovery board is rich, with many feature packs and tools available to help the developer get started quickly. Many IoT developers are interested in the X-CUBE-AWS package which provides everything needed to connect to the cloud when using AWS. Let's examine how a developer would do it.

cloud connection

To get started with the cloud, a developer needs to download X-CUBE-AWS. The software package comes as a zip file with various projects designed to run on the B-L4S5I-IOT01A, such as:

  • bootloader_KMS
  • bootloader_STSAFE
  • Cloud

These projects are located in:

Projects/B-L4S5I-IOT01A/Applications/

With the AWS Cloud project found under:

cloud/aws_demos

The cloud project is available for STM32Cube IDE, Keil and IAR. Of course, a developer could port these to other IDEs, but these three are commonly used in the industry.

A developer does not have to figure out how to get the project up and running independently. There are several valuable documents that can help you get started quickly. First, inside the main project directory, there is a Release_Notes.html file. This file contains general information about the project along with limitations and valuable references.

Below is a getting started guide that describes how to connect to AWS using the project. This document describes how to connect to AWS along with information about the stack and software (Figure 3). The document also describes the software stacks in detail, which can help a developer understand how the stacks are organized and what changes will be required to connect the device to the cloud.

application examples
Figure 3: X-CUBE-AWS provides the firmware and application examples needed to connect to AWS and build an IoT Thing capable of connecting to AWS. (Image source: STMicroelectronics)

The easiest way to connect to the cloud is to refer to the Introduction document and follow the tutorial. In addition to the tutorial, there are several additional reference sources that developers can use to get up to speed with the software package, including:

  • Next Steps for FreeRTOS
  • OTA Update User Guide
  • Configuring the IoT Core account and credentials

Among these documents, developers can quickly get up and running with a cloud application that can be used as the foundation for their own IoT device application.

Tips and tricks for using the Discovery B-L4S5I-IOT01A board

The Discovery B-L4S5I-IOT01A board has many features and capabilities that developers can take advantage of to quickly prototype their embedded product. Below are several "tips and tricks" developers should keep in mind that can simplify and speed up their development, such as

  • Take full advantage of the X-CUBE-AWS to connect to AWS easily. The software package comes with FreeRTOS already ported to the development board; developers only need to provision the device to connect it to the cloud.
  • Please read the startup documentation carefully. The documentation contains the steps necessary to perform a firmware update and connect to AWS.
  • Experiment with the sample over-the-air (OTA) update capabilities. The need to patch and upgrade IoT devices in the field is critical. Developers need to be aware of the capabilities and possible limitations of secure firmware updates.
  • Avoid starting from scratch by taking advantage of STMicroelectronic's feature packs, which help developers leapfrog device capabilities and functionality. These feature packs can drastically speed up development.
  • Please take the time to read the STSAFE documentation and understand how security features can improve device security. Security needs to be built into a device from the start, so it's imperative to do it during the rapid prototyping phase.

Developers who follow these “tips and tricks” will find that they save a lot of time and hassle when prototyping their app.

Conclusion:

Developing an IoT-connected device from scratch continues to have many obstacles and pitfalls that can delay timelines and lead to cost overruns. To avoid these issues, developers can take advantage of the B-L4S5I-IOT01A Discovery board to quickly prototype their connected applications. STMicroelectronics software stacks, expansion packs, and ecosystem provide developers with a one-stop shop to easily integrate software and speed deployment. The B-L4S5I-IOT01A is also fully capable of meeting the needs of modern devices, such as cloud connectivity, OTA secure firmware booting, and even running basic machine learning applications.

Source of information: https://www.digikey.es/es/articles/how-to-rapidly-prototype-iot-devices-using-the-b-l4s5i-iot01a-discovery-kit-iot-node