UM2913 STM32CubeU5 B-U585I-IOT02A Web Server Demonstration Firmware User Manual

June 6, 2024
ST

ST Logo

UM2913 STM32CubeU5 B-U585I-IOT02A Web Server Demonstration Firmware

UM2913 STM32CubeU5 B-U585I-IOT02A Web Server Demonstration
Firmware

Introduction

STM32Cube is an STMicroelectronics original initiative to significantly improve designer’s productivity by reducing development effort, time, and cost. STM32Cube covers the whole STM32 portfolio.
STM32Cube includes:

  • A set of user-friendly software development tools to cover project development from conception to realization, among which are:
    • STM32CubeMX, a graphical software configuration tool that allows the automatic generation of C initialization code using graphical wizards
    • STM32CubeIDE, an all-in-one development tool with peripheral configuration, code generation, code compilation, and debug features
    • STM32CubeProgrammer (STM32CubeProg), a programming tool available in graphical and command-line versions
    • STM32CubeMonitor (STM32CubeMonitor, STM32CubeMonPwr, STM32CubeMonRF, STM32CubeMonUCPD) powerful monitoring tools to fine-tune the behavior and performance of STM32 applications in real-time
  • STM32Cube MCU and MPU Packages, comprehensive embedded-software platforms specific to each microcontroller and microprocessor series (such as STM32CubeU5 for the STM32U5 Series), which include:
    • STM32Cube hardware abstraction layer (HAL), ensuring maximized portability across the STM32 portfolio
    • STM32Cube low-layer APIs, ensuring the best performance and footprints with a high degree of user control over hardware
    • A consistent set of middleware components such as FAT file system, RTOS, OpenBootloader, USB Host, USB Device, and USB Power Delivery
    • All embedded software utilities with full sets of peripheral and applicative examples
  • STM32Cube Expansion Packages, which contain embedded software components that complement the functionalities of the STM32Cube MCU and MPU Packages with:
    • Middleware extensions and applicative layers
    • Examples running on some specific STMicroelectronics development boards

The STM32CubeU5 demonstration firmware running on the B-U585I-IOT02A Evaluation board is built around the STM32Cube hardware abstraction layer (HAL) and low-layer (LL) APIs, and board support package (BSP) components.
This demonstration firmware is part of the STM32CubeU5 MCU Package. It shows how to use the MXCHIP module to perform HTTP requests using STM32Cube HAL. The MXCHIP module and a web browser (Google Chrome™ browser in this case) are used to create a web server. This web page supports PC and phone usage. The B -U585I-IOT02A board is the HTTP server in this demonstration. It contains the web page resources sent after each client request. The B-U585I-IOT02A board can decode, treat, and respond according to any client requests:

  • Web page resource requests, such as HTML page, CSS files, and JS files
  • Sensor values requests (Temperature, pressure, and humidity values)

The STM32U5 Series offers advanced power-saving microcontrollers, based on Arm® Cortex®-M33 to meet the most demanding power and performance requirements for smart applications, including wearables, personal medical devices, home automation, and industrial sensors.

General Information

The STM32CubeU5 demonstration firmware runs on the B-U585I-IOT02A Discovery kit featuring the STM32U585AI microcontroller based on the Arm® Cortex®‑M33 core with Arm® TrustZone®. Table 1 lists the acronyms and abbreviations used in this document.

Definition of Terms

Term

|

Definition

---|---

API

|

Application programming interface

BSP

|

Board support package

CSS

|

Cascading style sheets

HAL

|

Hardware abstraction layer

HTML

|

Hypertext markup language

HTTP

|

Hypertext transfer protocol

JS

|

JavaScript

Note: Arm and TrustZone are registered trademarks of Arm Limited (or its subsidiaries) in the US and/or elsewhere.

STM32CubeU5 Main Features

STM32Cube is an STMicroelectronics original initiative to significantly improve designer’s productivity by reducing development effort, time, and cost. STM32Cube covers the whole STM32 portfolio.
STM32Cube includes:.

  • A set of user-friendly software development tools to cover project development from conception to realization, among which are:
    • STM32CubeMX, a graphical software configuration tool that allows the automatic generation of C initialization code using graphical wizards
    • STM32CubeIDE, an all-in-one development tool with peripheral configuration, code generation, code compilation, and debug features
    • STM32CubeProgrammer (STM32CubeProg), a programming tool available in graphical and command-line versions
    • STM32CubeMonitor (STM32CubeMonitor, STM32CubeMonPwr, STM32CubeMonRF, STM32CubeMonUCPD) powerful monitoring tools to fine-tune the behavior and performance of STM32 applications in real-time
  • STM32Cube MCU and MPU Packages, comprehensive embedded-software platforms specific to each microcontroller and microprocessor series (such as STM32CubeU5 for the STM32U5 Series), which include:
    • STM32Cube hardware abstraction layer (HAL), ensuring maximized portability across the STM32 portfolio
    • STM32Cube low-layer APIs, ensuring the best performance and footprints with a high degree of user control over hardware
    • A consistent set of middleware components such as ThreadX, FileX / LevelX, USBX, NetX Duo, USB power delivery, TF-M, mbed-crypto, Touch library, Network library, OpenBootloader
    • All embedded software utilities with full sets of peripheral and applicative examples
  • STM32Cube Expansion Packages, which contain embedded software components that complement the functionalities of the STM32Cube MCU and MPU Packages with:
    • Middleware extensions and applicative layers
    • Examples running on some specific STMicroelectronics development boards

Within STM32CubeU5, both the HAL and LL APIs are production‑ready, checked with CodeSonar® static analysis tool, and developed in compliance with MISRA C® guidelines, following a process certified according to IEC 61508 systematic capability 2 level (SC2). Reports are available on demand.

STM32CubeU5 MCU Package Architecture

STM32CubeU5 MCU Package architecture

Demonstration Requirements

Hardware Requirements

The hardware requirements to start the demonstration application are:

  • board as shown in Section
  • USB Type-A to Mini-B cable to power up the STM32 Discovery board from the CN2 USB ST-LINK connector
Software Requirements

Web Browser
This element retrieves content from the web server and displays the page on the user’s device.

Google Chrome browser iconGoogle Chrome browser
icon Note: ©2021 Google LLC, used with permission. Google and the Google logo are registered trademarks of Google LLC.

Serial Terminal
This element allows seeing data sent to and from the microcontroller. The data can be used for several reasons including troubleshooting or debugging, communication testing, calibrating sensors, configuring modules, and data monitoring.

Tera terminal icon
Tera terminal icon

Demonstration Architecture

Architecture Overview

Demonstration Architecture Overview
Demonstration architecture overview

This demonstration has two user interfaces:

  • Serial terminal allows the users to follow demonstration run‑time steps and to provide their Wi‑Fi® credentials (Login and password).
  • Web browser is the web client that communicates with the web server via the HTTP protocol.
Architecture Components

Web Page Architecture

Web Page Resources
Web page resources

Project Architecture

Demonstration Project Architecture
Demonstration project architecture

Demonstration Features

Title Bar

The title bar is a static bar that shows the demonstration title.

The sidebar is the only navigation bar to dynamically switch between web page views. It counts four different menus:

  • Home view
  • Temperature acquisition view
  • Pressure acquisition view
  • Humidity acquisition view

Sidebar
Sidebar

Home View

This is the default view. It contains the STM32CubeU5 product information and web page views description.

Home view

Sensor Acquisition View

A dedicated view for each used sensor. Each view contains a draw area where curves are presented and a control panel that allows to start and stop the sensor acquisition.
Three sensor acquisition views can be selected:

  • Temperature acquisition view
  • Pressure acquisition view
  • Humidity acquisition view

Sensor Acquisition View
Sensor acquisition view

Background Mode

Background Mode Panel
The background panel allows the user to switch dynamically between the light mode and the dark mode views.

Background mode panel

Background Mode Views

Dark Mode View
Dark mode view

Light Mode View
Light mode view

Serial Terminal

At run time, the demonstration returns a detailed status according to each demonstration step via a Virtual COM port. The serial terminal allows also to provide Wi‑Fi® credentials to creating an access point and stating a socket communication between the web server and the web client.

Serial Terminal View
Serial terminal view

Functional Description

Demonstration Flow

Figure 15 explains the demonstration flow diagram, while Figure 16 to Figure 20 detail the five different steps following the software launch.

Demonstration Flow Diagram
Demonstration flow diagram

System Initialization Flow Diagram
System initialization flow diagram

Sensor Initialization Flow Diagram
Sensor initialization flow diagram

Socket Creation Flow Diagram
Socket creation flow diagram

HTTP Response Flow Diagram
HTTP response flow diagram

Revision History

Document Revision History

Date

| Revision| Changes
---|---|---
1-Oct-2021| 1|

Initial release.

IMPORTANT NOTICE – PLEASE READ CAREFULLY

STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of Purchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. For additional information about ST trademarks, please refer to www.st.com/trademarks. All other product or service names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

Related Manuals