STM32CubeH5 STM32H573I-DK Demonstration Firmware User Manual

Document UM3126, Revision 1, July 2023

Introduction

STM32Cube is an STMicroelectronics initiative designed to significantly reduce development effort, time, and cost across the entire STM32 portfolio. It comprises a set of user-friendly software development tools and comprehensive embedded software platforms.

Key STM32Cube Components:

  • STM32CubeMX: A graphical software configuration tool for automatic C initialization code generation.
  • STM32CubeIDE: An all-in-one development tool for peripheral configuration, code generation, compilation, and debugging.
  • STM32CubeCLT: A command-line development toolset for compilation, board programming, and debugging.
  • STM32CubeProgrammer: A graphical and command-line programming tool.
  • STM32CubeMonitor: Monitoring tools (STM32CubeMonitor, STM32CubeMonPwr, STM32CubeMonRF, STM32CubeMonUCPD) for real-time performance tuning.
  • STM32Cube MCU and MPU Packages: Embedded software platforms for specific microcontroller/microprocessor series (e.g., STM32CubeH5 for STM32H5 series), including:
    • STM32Cube Hardware Abstraction Layer (HAL) for maximized portability.
    • STM32Cube Low-Layer APIs (LL) for high performance and user control.
  • Middleware Components: Includes FAT file system, RTOS, OpenBootloader, USB Host, USB Device, and USB Power Delivery.
  • Embedded Software Utilities: Provide peripheral and application examples.
  • STM32Cube Expansion Packages: Offer middleware extensions and applicative layers, with examples for specific STMicroelectronics development boards.

The STM32CubeH5 Discovery board demonstration firmware leverages the STM32H5 capabilities using STM32Cube HAL BSP and utility components. Its architecture is designed to be an independent central component, usable with various RTOS and third-party firmware libraries through abstraction layers. This firmware supports STM32H5xx devices and runs on the STM32H573I-DK Discovery board.

General Information

The STM32CubeH5 demonstration firmware operates on the STM32H573I-DK Discovery board, featuring the STM32H573II microcontroller based on the Arm® Cortex®-M33 core with Arm® TrustZone® technology.

Table 1: Definition of Terms

TermDefinition
DMADirect memory access
GTZCGlobal TrustZone® controller
OCTOSPIOcto-SPI interface
OTFDECOn-the-fly decryption engine
RTCReal-time clock
SAISerial audio interface
TZSCTrustZone® security controller
USB-PDUSB power delivery

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

Global Architecture

The STM32CubeH5 demonstration firmware consists of two subdemonstrations accessible from a main menu launcher:

  1. TouchGFX Graphics Demonstration: Showcases the TouchGFX framework capabilities on the STM32H573I-DK. It runs in 16-bit color mode with double frame buffers in internal SRAM and assets stored in internal flash memory. Access to project code and reflashing requires TouchGFXDesigner (available on st.com as X-CUBE-TOUCHGFX).
  2. STM32H573I Demonstration: Built upon the STM32Cube MCU Package firmware and hardware services. It features a modular architecture where modules can be reused independently. A kernel manages common resources and facilitates adding new modules. Azure® RTOS ThreadX is used for task scheduling and module switching. Each module must provide specific functionalities and properties, including graphical aspects, startup/shutdown methods, application core logic, configuration, and error management. For building this demonstration separately, refer to STM32Cube_FW_H5_V1.1.0 or later.

Navigation is controlled via a touchscreen. Returning to the main menu requires pressing the physical reset button on the board.

Demonstration Functional Description

3.1 Main Graphical Interface

The main graphical interface presents a menu launcher to select one of the two subdemonstrations: the TouchGFX demo and the STM32H573I-DK demo.

[Description of Figure 2: Menu launcher showing two options: "TouchGFX Demo" and "STM32H573I-DK Demo"]

3.2 TouchGFX Demo

Overview: This demo provides access to four graphical user interface effects/applications.

Contents: The interface includes modules for:

  • Basement control
  • Light effect
  • Blend effect
  • Weather overview

[Description of Figure 3: TouchGFX main graphical menu with icons and labels for Home Control, Light effect, Blend effect, and Weather.]

3.2.1 Basement Control

This interface displays a scrollable list showing text and temperature values for schedule and temperature settings.

[Description of Figure 4: TouchGFX basement control screen showing a list of rooms (Living Room, Bedroom, Kitchen, Hall, Home Office, Bathroom) with their current temperatures and a "SCHEDULE" button.]

3.2.2 Light Effect

This UI animation demonstrates the graphics capabilities of TouchGFX and STM32H573xx devices with a smoothly moving light effect.

[Description of Figure 5: TouchGFX light effect screen showing the TouchGFX logo animating.]

3.2.3 Blend Effect

This UI showcases alpha blending of multiple layers using TouchGFX on STM32H573xx devices, entirely rendered by software.

[Description of Figure 6: TouchGFX blend effect screen showing layered graphics and an MCU load indicator.]

3.2.4 Weather Overview

This interface displays full-screen updates by sliding between different screens, showing weather information.

[Description of Figure 7: TouchGFX weather overview screen showing weather details for Copenhagen, including current temperature, time, and day forecast.]

3.3 STM32H573I-DK Demo

Overview: The main graphical interface presents a principal view of the demonstration, allowing users to launch applications via touchscreen. Available applications include Trust Zone, Audio Rec/Play, USB-PD, Calendar, and Cryptography, or display System Information.

Contents: The interface includes modules for:

  • Trust Zone (security peripheral/memory control access)
  • USB-PD application (dual role power and dual role data)
  • Calendar modules (Date/Time/Alarm)
  • Cryptography module (encrypt and decrypt code from external memory)
  • System information

[Description of Figure 8: STM32H573I-DK demo welcome screen with ST logo and "STM32H573I-DK DEMONSTRATION" text.]

[Description of Figure 9: STM32H573I-DK demo main graphical interface showing a menu with icons for TrustZone, Audio, USB-PD, Calendar, Cryptography, and System Information.]

3.3.1 TrustZone® Controller Modules

Overview: TrustZone® technology on Arm® Cortex®-M33 provides a solution for protecting data and code by dividing the system into secure (trusted) and non-secure (nontrusted) worlds. The Global TrustZone® Controller (GTZC) manages peripherals, memory, software, interrupts, and bus transactions.

Contents: The GTZC block includes:

  1. TZSC (TrustZone® Security Controller): Defines the secure privileged state of slave peripherals and controls subregion area size and properties of the watermark memory peripheral controller (MPCWM). It informs peripherals like RCC and GPIOs about security status.
  2. MPCBB (Block-based Memory Protection Controller): Configures internal RAM in TrustZone® systems with segmented SRAM (512-byte pages) and programmable security/privileged attributes.

Two applications are provided in emulation mode to demonstrate peripheral access control and memory access control.

[Description of Figure 10: TrustZone controller modules diagram showing icons for Peripherals and Memory.]

3.3.1.1 Peripheral Access Control

This demonstrates the TrustZone® security controller's role in defining secure privileged states for peripherals, using LED (GPIO) and UART as examples. It shows how peripherals are configured and the results of access attempts in a security context.

[Description of Figure 11: GTZC peripheral access interface showing security setup for UART and LED (S/NS options) and access mode selection (S/NS).]

3.3.1.2 Memory Access Control

The GTZC includes a subblock for memory protection. The MPCBB configures internal RAM with segmented SRAM and programmable security attributes. This example shows how GTZC protects specific memory regions, illustrating behavior when accessing normal versus forbidden zones.

[Description of Figure 12: GTZC memory access interface showing a memory map with a "Secure Area" (0x2000C800 to 0x20007D00) and a "Legal Access" address.]

3.3.2 Audio Module

Overview: The Serial Audio Interface (SAI) communicates with external audio devices and supports various audio standards. With a PDM interface, SAI can connect up to eight digital microphones for beamforming or speech capture.

Contents: SAI1 records PDM data from an onboard digital microphone. The STM32_Audio library converts PDM to PCM audible data, which is played via audio codecs CS42L51 and SAI2. The SAI is configured to receive/store data from a digital microphone in DMA mode and transmit it for playback. The module offers start, stop, pause, and resume controls for recording and playback. A headset must be plugged into the audio jack for playback.

[Description of Figure 13: Audio recorder interface showing "AUDIO PDM REC/PLAY" with recording/playing status and controls.]

3.3.3 USB-PD Module

This module demonstrates the USB-PD peripheral's functionality, allowing the board to act as a USB Device or USB Host. When connected via USB Type-C®, the board functions as a mouse, with cursor movement controlled by tapping triangles.

[Description of Figure 14: Mouse mode interface showing "DEVICE", "USBPD", "SRC" and "MOUSE MODE" with directional triangles and an "Enter" button.]

Clicking the "Switch" button and connecting a USB Type-C® device displays the USBPD command menu and device name. The menu options are:

  • Data Role Swap
  • Power Role Swap
  • Get Source/Sink capabilities

[Description of Figure 15: USBPD command menu showing "DEVICE", "USBPD", "SNK" and menu options: "Data Role Swap", "Power Role Swap", "Get Source Capa".]

Data Role Swap: Switches roles between host and device. Rejection results in a message.

Power Role Swap: Switches power roles between provider (source) and consumer (sink).

Get Source capabilities: Displays source capabilities upon request, or a rejection message if the request fails.

Get Sink capabilities: Displays sink capabilities upon request, or a rejection message if the request fails.

[Description of Figure 16: USBPD Source capabilities screen showing source voltage and current details.]

[Description of Figure 17: USBPD Sink capabilities screen showing sink voltage and current details.]

3.3.4 Calendar Module

This module showcases the RTC peripheral's calendar functionalities, including setting and displaying the date and time, and setting/disabling alarms. When an alarm triggers, the green LED toggles.

[Description of Figure 18: Calendar main menu with options for Date, Time, Alarm, and Return.]

[Description of Figure 19: Date configuration interface showing a calendar grid for January 2023, allowing date selection.]

[Description of Figure 20: Alarm configuration interface showing time input fields and directional arrows for setting the alarm.]

3.3.5 Cryptography Module

An On-The-Fly Decryption Engine (OTFDEC) allows decryption during read operations with minimal impact on execution time. In this module, OTFDEC is used with OCTOSPI to run encrypted (cipher) and unencrypted (plain) code from external memory. Execution times are compared.

[Description of Figure 21: Execution time comparison bar chart showing execution time in seconds for "Cipher Code" and "Plain Code".]

3.3.6 System Information Module

This module displays key demonstration information, including the board used, STM32CubeH5 firmware version, MCU name, board name, and CPU clock speed.

[Description of Figure 22: System information window displaying "MCU: STM32H573IIK3Q", "Board: STM32H573I-DK", "CPU Speed: 250 MHZ", "FW Version: V1.0.0", and "STMicroelectronics 2023".]

Revision History

Table 2: Document Revision History

DateRevisionChanges
05-Jul-20231Initial release.
Models: STM32H573I-DK Discovery Kit STMicro Mouser, STM32H573I-DK, Discovery Kit STMicro Mouser, Kit STMicro Mouser, STMicro Mouser

File Info : application/pdf, 22 Pages, 885.76KB

PDF preview unavailable. Download the PDF instead.

um3126-stm32cubeh5-stm32h573idk-demonstration-firmware-stmicroelectronics

References

C2 v20.4.0000 build 240 - c2 rendition config : Techlit Active Antenna House PDF Output Library 7.2.1732; modified using iText 2.1.7 by 1T3XT

Related Documents

Preview Migrating from STM32L4 and STM32L4+ to STM32L5 Series Microcontrollers
This application note provides a comprehensive guide on migrating embedded applications from STMicroelectronics' STM32L4 and STM32L4+ series microcontrollers to the STM32L5 series, detailing hardware and peripheral changes.
Preview STM32U585xx Ultra-Low-Power Arm Cortex-M33 Microcontroller Datasheet
Datasheet for STMicroelectronics STM32U585xx ultra-low-power Arm Cortex-M33 microcontroller. Features include high performance (160 MHz, 240 DMIPS), TrustZone security, 2MB Flash, 786KB SRAM, and extensive peripherals for embedded applications.
Preview STMicroelectronics STM32L Series: Ultra-Low-Power 32-bit MCUs
Explore the STMicroelectronics STM32L series of ultra-low-power 32-bit microcontrollers (MCUs), featuring the Arm Cortex-M0+, M3, M4, and M33 cores. Discover their features, applications, development tools, and ecosystem for energy-efficient embedded systems.
Preview AN5557: STM32H7 Dual-Core Architecture and Application Examples
This application note details the dual-core architecture of STM32H745/755 and STM32H747/757 microcontrollers, featuring Arm Cortex-M7 and Cortex-M4 cores. It covers system overview, memory resources, peripheral allocation, dual-core communication, boot modes, STM32CubeMX examples, debugging capabilities, and application partitioning strategies.
Preview STM32H5 Nucleo-144 Board (MB1404) User Manual
Explore the STM32H5 Nucleo-144 board (MB1404) by STMicroelectronics. This user manual provides comprehensive details on its features, development environment, hardware layout, power options, and connectors, enabling efficient prototyping and development with the STM32H5 microcontroller. Includes integrated STLINK-V3EC debugger and ARDUINO® Uno V3 compatibility.
Preview STM32H5 Nucleo-64 Board (MB1814) User Manual
Discover the STM32H5 Nucleo-64 development board (MB1814) from STMicroelectronics. This user manual details its features, connectivity options including ARDUINO Uno V3 and ST morpho headers, the integrated STLINK-V3EC debugger, and software resources for prototyping and embedded development.
Preview STM32H7B3I-DK Discovery Kit User Manual | STMicroelectronics
Discover the STM32H7B3I-DK Discovery kit, a comprehensive development platform from STMicroelectronics featuring the STM32H7B3LIH6QU Arm Cortex-M7 microcontroller. This manual details its features, hardware, and getting started guide for embedded system development.
Preview STM32H7S78-DK Discovery Kit: Features, Specifications, and Development Environment | STMicroelectronics
Explore the STM32H7S78-DK Discovery Kit, a comprehensive development platform featuring the Arm Cortex-M7 STM32H7S7L8H6H microcontroller. Discover its rich hardware features, ordering information, and development ecosystem.