laitimes

How to quickly complete the design with an IoT node development board? To learn is to earn!

author:DigiKey

原创:Jacob Beningo@DigiKey得捷电子

As Internet of Things (IoT)-connected devices become more common, developers starting from scratch realize that the development of these products is not as straightforward as they would like, especially when time is tight and cost is limited. From choosing a trusted, secure, and well-supported development environment to choosing compatible software and hardware, it turns out that designing and building an IoT device still requires a wide range of skills.

Developers increasingly need secure solutions, cloud-connected libraries, real-time operating systems, and compatible hardware and software development platforms that provide ready-to-integrate sensors, all in one scalable package.

This article discusses how IoT designers can use the STMicroelectronics B-L4S5I-IOT01A IoT Node Discovery Kit to quickly prototype their products. It discusses the performance of the on-board microcontroller, the abundance of sensors and configuration options, and how to connect to Amazon Web Services (AWS) and quickly start building prototypes and final products.

B-L4S5I-IOT01A Introduction to the IoT Node Discovery Kit

The B-L4S5I-IOT01A Discovery board is a one-stop development board that can be used to prototype virtually any embedded IoT device (Figure 1). The board has enough processing power, sensors, and scalability to enable any embedded developer to build the application of their dreams. The B-L4S5I-IOT01A board is based on a low-power Arm® Cortex-M4® processor running at 120 megahertz (MHz) and is supported by 2 megabytes (Mbytes) of program flash memory and 640 kilobytes (KB) of SRAM. STM32L4S5VIT6 also has features that are ideal for IoT applications, such as:

  • One floating-point unit (FPU)
  • A 14-channel dynamic memory access (DMA) controller
  • A HARDWARE ACCELERATOR FOR AES AND HASH ENCRYPTION
  • Advanced graphics features
  • The ULPMark CP Energy Benchmark score is 233
How to quickly complete the design with an IoT node development board? To learn is to earn!

Image source: STMicroelectronics

Figure 1: The B-L4S5I-IOT01A is based on an Arm Cortex-M4 processor, runs at up to 120 MHz, has 2 Mbytes of flash memory, 640 KB of RAM, wireless connectivity, and multiple sensors.

Processing power and energy efficiency alone don't make a great platform for rapid prototyping. The board is also equipped with wireless connectivity in the form of an 802.11b/g/n compatible Wi-Fi module () and a Bluetooth 4.1 module from STMicroelectronics, as well as a range of sensors. It includes two digital speakerphones, a capacitive digital sensor for relative humidity and temperature, and a high-performance triaxial magnetometer.

The above list is by no means comprehensive: a more detailed description can be found in the following link. Next, it's important to examine the software tools and stacks that can be used to accelerate development.

B-L4S5I-IOT01A Discovery Kit for IoT nodes: https://www.digikey.cn/zh/product-highlight/s/stmicroelectronics/b-l4s5i-iot01a-discovery-kit-for-iot-node?utm_medium=social&utm_source=wechat&utm_campaign=wechatsocial

STM32's ecosystem

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

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

How to quickly complete the design with an IoT node development board? To learn is to earn!

图片来源:Beningo Embedded Group

Figure 2: STM32CubeIDE provides developers with an IDE for creating, configuring, and managing embedded software for IoT devices.

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

In addition to configuring and deploying the codebase, the STM32 ecosystem provides some useful tools for developers working at the cutting edge. For example, developers who want to take advantage of machine learning Xi in their applications can take advantage of Extended X-CUBE-AI, which provides teams with a simplified framework for translating, validating, and running inference on STM32. For example, a developer can use TensorFlow Lite to train a model and then convert that model into C code to run on a microcontroller in just a few minutes. In addition, there are expansion packs with ready-to-run software, including:

  • For facial recognition applications
  • For condition monitoring applications
  • Used for image classification applications
  • Used for audio and scene classification applications

Security should be considered for every IoT device, even during the rapid prototyping phase. Today's networks are rife with non-stop attacks, security breaches, and exploitation of business and customer data. Therefore, any rapid prototyping platform should have the ability to scale effectively to a production system. The board can leverage STMicroelectronics' (Secure Boot Secure Firmware Update, SBSFU) software stack to provide developers with this capability. The SBSFU is available in the X-CUBE-SBSFU feature set, which provides:

  • Root of Trust (RoT) service
  • Security key management services
  • Encryption schemes
  • Secure firmware update service

The ecosystem around the B-L4S5I-IOT01A Discovery board is very rich, with many feature packages and tools available to help developers get started quickly. Many IoT developers are interested in software packages, which provide everything necessary to connect to the cloud when using AWS. Let's look at how developers can do this.

Connect to the cloud

TO GET STARTED WITH THE CLOUD, DEVELOPERS NEED TO DOWNLOAD X-CUBE-AWS. The package comes in the form of a compressed file with several projects designed to run on the B-L4S5I-IOT01A, such as:

  • Bootloader_KMS
  • Bootloader_STSAFE
  • Cloud

These projects are located at:

Projects/B-L4S5I-IOT01A/Applications/

AWS Cloud projects are located at:

Cloud/aws_demos

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

Developers don't need to figure out how to make the project run on its own. There are several valuable files that can help them get started quickly. First, in the main project directory, there is a Release_Notes.html file. This document contains general information on the project as well as limitations and valuable references.

Next, there's a getting started guide that shows you how to use the project to connect to AWS. This document describes how to connect to AWS and the stack and software information (Figure 3). The document also details the software stack, which can help developers understand how it is organized and the changes needed to connect devices to the cloud.

Getting Started: https://www.st.com/content/st_com/en/search.html#q=UM2178%20-t=resources-page=1

How to quickly complete the design with an IoT node development board? To learn is to earn!

Image source: STMicroelectronics

Figure 3: X-CUBE-AWS provides the firmware and application examples needed to connect to AWS and develop IoT devices that are able to connect to AWS.

The easiest way to connect to the cloud is to run the starter file and follow the tutorial. In addition to the tutorial, there are several additional reference materials that developers can use to speed up the use of the package, including:

  • Next steps for FreeRTOS (https://docs.aws.amazon.com/freertos/latest/userguide/freertos-next-steps.html?utm_medium=social&utm_source=wechat&utm_campaign=wechatsocial)
  • OTA Update User Guide (https://docs.aws.amazon.com/freertos/latest/userguide/ota-demo.html?utm_medium=social&utm_source=wechat&utm_campaign=wechatsocial)
  • Set up IoT core accounts and credentials (https://docs.aws.amazon.com/freertos/latest/userguide/freertos-getting-started.html?utm_medium=social&utm_source=wechat&utm_campaign=wechatsocial)

In between these files, developers can quickly get up and running a cloud application that serves as the basis for their own IoT device application.

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

The B-L4S5I-IOT01A Discovery board has a number of features and capabilities that developers can take advantage of to quickly prototype their embedded products. Here are a few "tips and tricks" that developers should keep in mind to simplify and speed up their development, such as:

  • Take advantage of X-CUBE-AWS and easily connect to AWS. The FreeRTOS in the package has been ported to the board, and developers only need to configure the device to connect to the cloud.
  • Read the getting started documents carefully. This file contains the necessary steps to perform a firmware update and connect to AWS.
  • Experiment with over-the-air (OTA) update capabilities in the example. Patching and updating IoT devices in the field is a critical requirement. Developers should be aware of the capabilities and any limitations of secure firmware updates.
  • Avoid starting from scratch by leveraging STMicroelectronics' feature packs that can help developers get off to a fast start in terms of capabilities and device capabilities. These feature packs can greatly accelerate development.
  • Take the time to read through the STSAFE file to understand how the security elements can improve the security of your device. Security must be built into the device from the start, so it's a must to get it done during the rapid prototyping phase.

Developers who follow these "tips and tricks" will find that they can save a lot of time and hassle when prototyping their apps.

epilogue

There are still many hurdles and pitfalls in developing IoT-connected devices from scratch that can delay timelines and lead to cost overruns. To avoid these issues, developers can leverage the B-L4S5I-IOT01A Discovery board to quickly prototype their IoT applications. STMicroelectronics' software stacks, expansion packages, and ecosystem provide a one-stop-shop for developers to easily integrate software and accelerate implementation. The B-L4S5I-IOT01A is also fully capable of meeting the needs of modern devices, such as cloud connectivity, secure boot firmware via OTA, and even basic machine Xi applications.

Read on