0% found this document useful (0 votes)
8 views

Getting Started With STM32CubeH7 for STM32H7 Series MCUs

The STM32CubeH7 user manual provides an overview of the STM32Cube initiative aimed at enhancing developer productivity for STM32H7 series microcontrollers. It details the features and architecture of the STM32CubeH7 MCU Package, which includes a range of development tools, middleware components, and APIs designed for efficient application development. The manual also outlines the structure of the STM32CubeH7 firmware, including its layered architecture and the various components available for users to leverage in their projects.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Getting Started With STM32CubeH7 for STM32H7 Series MCUs

The STM32CubeH7 user manual provides an overview of the STM32Cube initiative aimed at enhancing developer productivity for STM32H7 series microcontrollers. It details the features and architecture of the STM32CubeH7 MCU Package, which includes a range of development tools, middleware components, and APIs designed for efficient application development. The manual also outlines the structure of the STM32CubeH7 firmware, including its layered architecture and the various components available for users to leverage in their projects.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

UM2204

User manual

Getting started with STM32CubeH7 for STM32H7 series MCUs

Introduction
STM32Cube is an STMicroelectronics original initiative to improve designer productivity significantly 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
– STM32CubeCLT, an all-in-one command-line development toolset with code compilation, board programming, 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 STM32CubeH7 for the STM32H7 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 RTOS, USB Host and Device, TCP/IP, mbedTLS, FAT file
system, audio, and graphics
– 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

This user manual describes how to get started with the STM32CubeH7 MCU Package. Section 1: STM32CubeH7 main features
describes the main features of the STM32CubeH7 MCU Package.
Section 2: STM32CubeH7 architecture overview and Section 3: STM32CubeH7 MCU Package overview provide an overview of
the STM32CubeH7 architecture and MCU Package structure.

UM2204 - Rev 8 - December 2023 www.st.com


For further information contact your local STMicroelectronics sales office.
UM2204
STM32CubeH7 main features

1 STM32CubeH7 main features

STM32CubeH7 MCU Package runs on STM32H7 32-bit microcontrollers based on Arm® Cortex®-M processors.
The STM32H7 products come with different lines: mainly single-core lines based on Arm® Cortex®-M7 and dual-
core lines based on an Arm® Cortex®-M7 + Arm® Cortex®-M4 architecture.
Note: Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere.

STM32CubeH7 contains all generic embedded software components required to develop an application on
STM32H7 microcontrollers in a single package. This set of components is highly portable, not only within the
STM32H7 series but also to other STM32 series.
STM32CubeH7 is fully compatible with STM32CubeMX code generator that allows the user to generate
initialization code. The package includes low-layer (LL) and hardware abstraction layer (HAL) APIs that cover the
microcontroller hardware, together with an extensive set of examples running on STMicroelectronics boards. The
HAL and LL APIs are available in an open-source BSD license for user convenience. They are compliant with
MISRA C®: 2012 guidelines, and have been reviewed with a static analysis tool to eliminate possible runtime
errors. Reports are available on demand.
The STM32CubeH7 MCU Package also contains a set of middleware components with the corresponding
examples. They come with very permissive license terms:
• Full USB host and device stack, supporting many classes:
– Host classes: HID, MSC, CDC, Audio, MTP.
– Device classes: HID, MSC, CDC, Audio, DFU.
• Graphics:
– STemWin, a professional graphical stack solution available in binary format and based on the emWin
solution from STMicroelectronics' partner SEGGER.
– LibJPEG, an open-source implementation on STM32 for JPEG image encoding and decoding.
– TouchGFX, a professional graphical stack solution from STMicroelectronics to create revolutionary
embedded graphical user interfaces (GUIs) with high-end graphics and maximum performance on
energy-efficient STM32 microcontrollers.
• Audio:
– PDM2PCM library, offering a solution to decimate and filter out a pulse density modulated (PDM)
stream from a digital microphone, to convert it to a pulse code modulated (PCM) signal output
stream.
• CMSIS-RTOS implementation with FreeRTOS™ open-source solution. This RTOS solution comes with
dedicated communications primitives (stream buffers and message buffers), allowing to pass data from an
interrupt service routine to a task, or from one core to another in STM32H7 dual-core lines.
• OpenAMP, an AMP framework providing software components that allow the development of software
applications for asymmetric multiprocessing (Arm® Cortex®-M7 and Arm® Cortex®-M4 in STM32H7 dual
lines).
• FAT File system based on the open-source FatFS solution.
• TCP/IP stack based on the open-source LwIP solution.
• SSL/TLS secure layer based on the open-source mbedTLS.
• Network interface:
– STM32_Network_Library provides APIs to access network services on STM32 devices. It supports
several network adapters and protocols required by STM32Cube applications using network services.
Several demonstrations implementing these middleware components are also provided in the STM32CubeH7
MCU Package.

UM2204 - Rev 8 page 2/28


UM2204
STM32CubeH7 main features

Figure 1. STM32CubeH7 firmware components

Evaluation Discovery STM32 Nucleo Dedicated User


boards boards boards boards application Utilities
Application level demonstrations

Dual core FAT file CMSIS


TCP/IP SSL/TLS USB Graphics Audio RTOS
AMP system

Middleware level(1) Utilities

Board Support Package (BSP) Hardware Abstraction Layer (HAL) Low-layer APIs (LL)

HAL APIs

DT46100V2
(1) The set of middleware components depends on the product series.

UM2204 - Rev 8 page 3/28


UM2204
STM32CubeH7 architecture overview

2 STM32CubeH7 architecture overview

The STM32CubeH7 firmware solution is built around three independent levels that can easily interact with each
other as described in Figure 2. STM32CubeH7 firmware architecture .

Figure 2. STM32CubeH7 firmware architecture

Level 2 Evaluation, Discovery and Nucleo boards demonstration

Applications

Level 1

Library and protocol based components


(for example FatFS, FreeRTOS, OpenAmp, USB Device)

Examples

Level 0 BSP drivers


Hardware abstraction layer (HAL)

Core drivers (optional) Low layer (LL)

DT45397V1
HAL

2.1 Level 0
This level is divided into three sub-layers:
• Board support package (BSP)
• Hardware abstraction layer (HAL)
• Low layer drivers
• Basic peripheral usage examples

2.1.1 Board support package (BSP)


This layer offers a set of APIs relative to the hardware components in the hardware boards (such as Audio codec,
I/O expander, Touchscreen, SRAM driver or LCD drivers). It is composed of two parts:
• Component
This is the driver related to the external device on the board and not related to the STM32, the component
driver provides specific APIs to the BSP driver external components and can be ported to any board.
• BSP driver
It allows linking the component driver to a specific board and provides a set of user-friendly APIs. The API
naming rule is BSP_FUNCT_Action(): ex. BSP_LED_Init(),BSP_LED_On()

UM2204 - Rev 8 page 4/28


UM2204
STM32CubeH7 architecture overview

The BSP is based on a modular architecture allowing an easy porting on any hardware by just implementing the
low level routines.

2.1.2 Hardware abstraction layer (HAL) and low-layer (LL)


The HAL layer provides the low level drivers and the hardware interfacing methods to interact with the upper
layers (application, libraries and stacks). It provides generic, multi instance and function-oriented APIs which
simplify the user application implementation by providing ready-to-use processes. As example, for the
communication peripherals (I2S, UART…), it includes APIs allowing to initialize and configure the peripheral,
manage data transfer based on polling, interrupt or DMA process, and handle communication errors that may
raise during communication. The HAL Drivers APIs are split in two categories:
• Generic APIs which provide common and generic functions to all the STM32 Series
• Extension APIs which provide specific and customized functions for a specific family or a specific part
number
• The low-layer APIs provide low-level APIs at register level, with better optimization but less portability. They
require a deep knowledge of MCU and peripheral specifications. The LL drivers are designed to offer a fast
light-weight expert-oriented layer which is closer to the hardware than the HAL. Contrary to the HAL, LL
APIs are not provided for peripherals where optimized access is not a key feature, or for those requiring
heavy software configuration and/or complex upper-level stack. The LL drivers feature:
– A set of functions to initialize peripheral main features according to the parameters specified in data
structures
– A set of functions used to fill initialization data structures with the reset values corresponding to each
field
– Function for peripheral de-initialization (peripheral registers restored to their default values)
– A set of inline functions for direct and atomic register access
– Full independence from HAL and capability to be used in standalone mode (without HAL drivers)
– Full coverage of the supported peripheral features.
• Dual Core implementation:
– The same HAL/LL drivers support both the single and dual core STM32H7 lines
◦ In the STM32H7 dual core devices all peripherals can be accessed in the same way by the two
cores (Cortex®-M7 and Cortex®-M4). It means there is no peripherals split or default allocation
between Cortex®-M7 and Cortex®-M4. For this reason the same peripheral HAL and LL drivers
are shared between the two cores.
◦ Furthermore, some peripherals ( mainly: RCC, GPIO, FLASH, PWR, HSEM..) have additional
dual core specific features:
• “DUAL_CORE” define is used to delimit code (defines , functions, macros.. ) available
only in dual core line.
• “CORE_CM4” define is used to delimit code where we a specific configuration/code
portion for Cortex®-M4 core
• “CORE_CM7” define is used to delimit code where we a specific configuration/code
portion for Cortex®-M7 core on a dual core line.

2.1.3 Basic peripheral usage examples


This layer contains the examples of the basic operation of the STM32H7 peripherals using either the HAL APIs as
well as the BSP resources.

UM2204 - Rev 8 page 5/28


UM2204
STM32CubeH7 architecture overview

2.2 Level 1
This level is divided into two sub-layers:

2.2.1 Middleware components


Middleware components are a set of libraries covering USB Host and Device Libraries, STemWin, TouchGFX,
LibJPEG, FreeRTOS™, OpenAMP, FatFS, LwIP, mbedTLS, and PDM2PCM audio library. Horizontal interactions
between the components of this layer are performed directly by calling the feature APIs while the vertical
interaction with the low level drivers is done through specific callbacks and static macros implemented in the
library system call interface. As example, the FatFs implements the disk I/O driver to access microSD drive or the
USB Mass Storage Class.
The main features of each middleware component are as follows:
• USB host and device libraries
– Several USB classes supported (mass-storage, HID, CDC, DFU, AUDIO, MTP)
– Support of multipacket transfer features: allows sending big amounts of data without splitting them
into max packet size transfers.
– Use of configuration files to change the core and the library configuration without changing the library
code (read-only).
– 32-bit aligned data structures to handle DMA-based transfer in High-speed modes.
– Support of multi USB OTG core instances from user level through configuration file (that allows an
operation with more than one USB host/device peripheral).
– RTOS and Standalone operation
– The link with low-level driver through an abstraction layer using the configuration file to avoid any
dependency between the Library and the low-level drivers.
• STemWin Graphical stack
– Professional grade solution for GUI development based on Segger’s emWin solution
– Optimized display drivers
– Software tools for code generation and bitmap editing (STemWin Builder…)
• LibJPEG
– Open source standard
– C implementation for JPEG image encoding and decoding.
• TouchGFX Graphical stack
– Professional graphical stack solution from STMicroelectronics
– Allotting to create revolutionizing embedded graphical user interfaces (GUIs) with high-end graphics
and maximum performance on energy efficient STM32 microcontrollers
• FreeRTOS
– Open source standard
– CMSIS compatibility layer
– Tickless operation during low-power mode
– Integration with all STM32Cube middleware modules
• OpenAmp
– AMP framework providing for asymmetric multiprocessing (Cortex®-M7 and Cortex®-M4 in STM32H7
dual lines)
• FAT File system
– FatFs FAT open-source library
– Long file name support
– Dynamic multi-drive support
– RTOS and standalone operation
– Examples with microSD and USB host mass-storage class
• LwIP TCP/IP stack
– Open source standard
– RTOS and standalone operation

UM2204 - Rev 8 page 6/28


UM2204
STM32CubeH7 architecture overview

• PDM2PCM audio library


– Sampling rate of 16 kHz with a 16-bit resolution
– Various decimation factors to adapt to various PDM clocks
– Configurable digital microphone gain with 1 dB step in the range of -12 dB to +51 dB
• STM32_Network_Library
– APIs for accessing network services on STM32 devices
– Several network adapters and protocols

2.2.2 Examples based on the middleware components


Each middleware component comes with one or more examples (called also Applications) showing how to use it.
Integration examples that use several middleware components are provided as well.

2.3 Level 2
This level is composed of a single layer which is a global real-time and graphical demonstration based on the
middleware service layer, the low level abstraction layer and the basic peripheral usage applications for board-
based features.
Dual core examples and applications follow a dedicated architecture:
• In dual core lines, only one project (one workspace) per example/application is provided. This is to be
compatible with legacy (single core lines) offer.
• Two target projects configuration per workspace (one per core) named STM32YYxx_CM7 and
STM32YYxx_CM4.
• Each target configuration has its own option settings: target device, linker options, RO, RW zones,
preprocessor symbols (CORE_CMx , CORE_CMy) so that user code can be compiled, linked and
programmed separately for each core. The compilation results in 2 binaries: CM7 binary and CM4 binary.

Figure 3. Dual core project architecture

UM2204 - Rev 8 page 7/28


UM2204
STM32CubeH7 architecture overview

Figure 4. Dual core project linker file

UM2204 - Rev 8 page 8/28


UM2204
STM32CubeH7 MCU Package overview

3 STM32CubeH7 MCU Package overview

3.1 Supported STM32H7 devices and hardware


STM32Cube offers a highly portable Hardware Abstraction Layer (HAL) built around a generic and modular
architecture. It allows the upper layers, the middleware and application, to implement its functions without
knowing, in-depth, the MCU used. This improves the library code re-usability and guarantees an easy portability
from one device to another.
The STM32CubeH7 offers a full support for all the STM32H7 devices. The user only needs to define the right
macro in the stm32h7xx.h file.
Table 1. Macros for STM32H7 Series lists which macro to define depending on the used STM32H7 Series device.
This macro can also be defined in the compiler preprocessor.

Table 1. Macros for STM32H7 Series

Macro defined in
STM32H7 part numbers
stm32h7xx.h

STM32H742xx STM32H742VI, STM32H742ZI, STM32H742II, STM32H742BI, STM32H742XI


STM32H743xx STM32H743VI, STM32H743ZI, STM32H743II, STM32H743BI, STM32H743XI

STM32H745xx(1) STM32H745ZI, STM32H745II, STM32H745BI, STM32H745XI

STM32H747xx(1) STM32H747ZI, STM32H747AI, STM32H747II, STM32H747BI, STM32H747XI

STM32H750xx STM32H750VB, STM32H750IB, STM32H750XB


STM32H753xx STM32H753VI, STM32H753ZI, STM32H753II, STM32H753BI, STM32H753XI

STM32H755xx(1) STM32H755ZI, STM32H755II, STM32H755BI, STM32H755XI

STM32H757xx(1) STM32H757ZI, STM32H757AI, STM32H757II, STM32H757BI, STM32H757XI

STM32H7B0xx STM32H7B0ZB, STM32H7B0VB, STM32H7B0RB, STM32H7B0IB, STM32H7B0AB


STM32H7B3AI, STM32H7A3ZI, STM32H7A3ZG, STM32H7A3VI, STM32H7A3VG,
STM32H7A3xx STM32H7A3RI, STM32H7A3RG, STM32H7A3QI, STM32H7A3NI, STM32H7A3NG,
STM32H7A3LI, STM32H7A3II, STM32H7A3IG, STM32H7A3AI, STM32H7A3AG
STM32H753BI, STM32H7B3ZI, STM32H7B3VI, STM32H7B3RI, STM32H7B3QI,
STM32H7B3xx
STM32H7B3NI, STM32H7B3LI, STM32H7B3II
STM32H735AG, STM32H735IG, STM32H735RG, STM32H735VG, STM32H735VG,
STM32H735xx
STM32H735ZG
STM32H733xx STM32H733VG, STM32H733VG, STM32H733ZG, STM32H733ZG
STM32H730VB, STM32H730VB, STM32H730ZB, STM32H730ZB, STM32H730IB,
STM32H730xx
STM32H730AB
STM32H725AG, STM32H725IG, STM32H725IG, STM32H725RG, STM32H725VG,
STM32H725xx STM32H725VG, STM32H725ZG, STM32H725RE, SM32H725VE, STM32H725ZE,
STM32H725AE, STM32H725IE, STM32H725IE
STM32H723VG, STM32H723VG, STM32H723ZG, STM32H723ZG, STM32H723VE,
STM32H723xx
STM32H723VE, STM32H723ZE, STM32H723ZE

1. STM32H745xx, STM32H747xx, STM32H755xx, and STM32H757xx are dual core devices. When using these devices,
either CORE_CM7 or CORE_CM4 (depending of the target core configuration) shall be added into the compiler
preprocessor.

The STM32CubeH7 features a rich set of examples and demonstrations at all levels making it easy to understand
and use any HAL driver and/or middleware components. These examples can be run on any of the
STMicroelectronics boards as listed in Table 2. Evaluation, Discovery and Nucleo boards for STM32H7 Series :

UM2204 - Rev 8 page 9/28


UM2204
STM32CubeH7 MCU Package overview

Table 2. Evaluation, Discovery and Nucleo boards for STM32H7 Series

Board Supported STM32H7 lines

STM32H743I-EVAL
STM32H743xx, STM32H753xx and STM32H750xx (1)
NUCLEO-H743ZI
NUCLEO-H745ZI-Q STM32H745xx and STM32H755xx
STM32H745I-DISCO STM32H745xx and STM32H755xx
STM32H747I-DISCO STM32H747xx and STM32H757xx
STM32H747I-EVAL STM32H747xx and STM32H757xx
STM32H750B-DK STM32H750xx
STM32H7B3I-EVAL
STM32H7B3xxQ and STM32H7B0xxQ(2)
STM32H7B3I-DK
NUCLEO-H7A3ZI-Q STM32H7A3xxQ
NUCLEO-H723ZG STM32H723xx

STM32H735G-DK STM32H735xx and STM32H730xx(3)

1. The STM32H750xx belong to STM32H750 Value line. They feature only 128 Kbytes of internal Flash memory. These
devices are intended for code execution from external memories. Dedicated applications are available under
Projects\STM32H743I-EVAL\Applications\ExtMem_CodeExecution
2. STM32H7B0xx devices belong to STM32H7B0 Value Line. They feature only 128 Kbytes of internal Flash memory. They
are intended for code execution from external memories. Dedicated applications are available under Projects
\STM32H7B3I-DK\Applications\ExtMem_CodeExecution.
3. STM32H730xx devices belong to STM32H730 Value Line. They feature only 128 Kbytes of internal Flash memory and are
intended for code execution from external memories. Dedicated applications are available under Projects \STM32H735G-
DK\Applications\ExtMem_CodeExecution.

The STM32CubeH7 MCU Package can run on any compatible hardware. Simply update the BSP drivers to port
the provided examples on the user board if its hardware features are the same (LED, LCD display, pushbuttons).

UM2204 - Rev 8 page 10/28


UM2204
STM32CubeH7 MCU Package overview

3.2 MCU Package overview


The STM32CubeH7 firmware solution is provided in a single zip package with the structure shown in
Figure 5. STM32CubeH7 MCU Package structure.

Figure 5. STM32CubeH7 MCU Package structure

BSP drivers for the


supported boards

This folder contains


STM32H7xx CMSIS
files that defines
peripheral register
declarations, bit
STM32H7 HAL and
definitions and
LL drivers
address mapping

USB Host library


supporting both OTG
USB Device library
FS and HS cores and
supporting both OTG
covering the following
FS and HS cores
classes: HID, MSC,
and covering the
CDC, Audio, and
following classes:
MTP
HID, MSC, CDC,
Audio, and DFU

Set of examples
organized by board
and provided with
preconfigured
projects.

DT45398V3

For each board, a set of examples is provided with preconfigured projects for EWARM, MDK-ARM, and
STM32CubeIDE toolchains.
Figure 6. STM32CubeH7 example overview shows the project structure for the STM32H743I-EVAL board. The
structure is identical for other boards.

UM2204 - Rev 8 page 11/28


UM2204
STM32CubeH7 MCU Package overview

Figure 6. STM32CubeH7 example overview

DT73654V1
The examples are classified depending on the STM32Cube level they apply to, and are named as follows:
• Examples in level 0 are called Examples. They use the HAL drivers without any middleware component.
• Examples in level 1 are called Applications. They provide typical use cases of each middleware
component.
• Examples in level 2 are called Demonstration. They implement all the HAL, BSP, and middleware
components.
Template projects (HAL and LL) are provided to allow the user to quickly build any firmware application on a given
board.
For single core boards (STM32H43I-EVAl, STM32H7B3I-EVAL, STM32H7B3I-DK, STM32H735G-DK, NUCLEO-
H7A3ZI-Q, NUCLEO-H743ZI, and NUCLEO-H723ZG): one HAL and one LL template project.
For dual core boards (NUCLEO-H745ZI-Q, STM32H745I-DISCO, STM32H747I-DISCO, and STM32H747I-
EVAL):
• One LL template project

UM2204 - Rev 8 page 12/28


UM2204
STM32CubeH7 MCU Package overview

• Four HAL template projects:


– BootCM4_CM7:
◦ Arm® Cortex®-M7 and Arm® Cortex®-M4 running from the flash memory (each from a bank).
◦ System configuration is performed by the Arm® Cortex®-M7 processor.
◦ Arm® Cortex®-M4 goes to STOP after boot, and is then woken up by Arm® Cortex®-M7 using a
hardware semaphore.
– BootCM7_CM4Gated:
◦ Arm® Cortex®-M4 boot is gated using flash memory option bytes.
◦ Arm® Cortex®-M7 and Arm® Cortex®-M4 run from the flash memory (each from a different
bank).
◦ Arm® Cortex®-M7 boots, performs the system configuration, and enables Arm® Cortex®-M4
boot using RCC.
– BootCM4_CM7Gated:
◦ Arm® Cortex®-M7 boot is gated using flash memory option bytes.
◦ Arm® Cortex®-M7 and Arm® Cortex®-M4 run from the flash memory (each from a different
bank).
◦ Arm® Cortex®-M4 boots, performs the system configuration, and enables Arm® Cortex®-M7
boot using RCC.
– BootCM7_CM4Gated_RAM:
◦ Arm® Cortex®-M4 boot is gated using flash memory option bytes.
◦ Arm® Cortex®-M7 runs from the flash memory (Bank1), and Arm® Cortex®-M4 runs from the
D2 domain SRAM.
◦ Arm® Cortex®-M7:
• Boots.
• Performs the system configuration.
• Loads the Arm® Cortex®-M4 code into the D2 SRAM.
• Changes the Arm® Cortex®-M4 boot address and enables Arm® Cortex®-M4 boot (using
the RCC).
For the STM32H750B-DK Value line board the template is composed of two subtemplate projects:
• ExtMem_Boot: reference boot code executing from internal flash memory, enabling to configure external
memories, then jumping to the user application located in an external memory. Two use cases are possible,
XiP and boot ROM:
– XiP: this use case is intended for eXecution in Place from external flash memory (quad-SPI). The
user application code shall be linked with the target execution memory address (external quad-SPI
flash memory).
– Boot ROM: this use case is intended to demonstrate how to boot from internal flash memory,
configure the external SDRAM, copy user application binary from the SDMMC flash memory or from
quad-SPI flash memory to the external SDRAM then jump to the user application. In this case, the
user application code shall be linked with the target execution memory address (external SDRAM).
• Template_Project: typical template with execution from external memory. Different configurations are
available depending on the possibilities offered by the external memory boot:
– XiP from quad-SPI flash memory, data stored in internal SRAM.
– XiP from quad-SPI flash memory, data stored in external SDRAM.
– Boot ROM: execution from external SDRAM, data stored in internal SRAM.

UM2204 - Rev 8 page 13/28


UM2204
STM32CubeH7 MCU Package overview

For STM32H7B0xx and STM32H730xx Value line devices based on the STM32H7B3I-DK and STM32H735G-DK
boards, respectively, ExtMem_CodeExecution applications are provided with two subapplications:
• ExtMem_Boot: reference boot code executing from internal flash memory, enabling to configure external
memories, then jumping to the user application located in an external memory. Two use cases are possible:
XiP and boot ROM.
– XiP: this use case is intended for eXecution in Place from external flash memory (octo-SPI). The user
application code shall be linked to the target execution memory address (external octo-SPI NOR
flash memory).
– Boot ROM: this use case is intended to demonstrate how to boot from internal flash memory,
configure the external RAM (FMC-SDRAM for STM32H7B3I-DK and octo-SPI HyperRAM for
STM43H735G-DK), copy the user application binary from the micro-SD memory or from the octo-SPI
flash memory to the external SDRAM/HyperRAM, and then jump to the user application. The user
application code shall be linked to the target execution memory address (external SDRAM/
HyperRAM).
• ExtMem_Application: two subprojects are provided (LedToggling and FreeRTOS™) with execution from
external memory.
– XiP from octo-SPI flash memory, data stored in external RAM (SDRAM on STM32H7B3I-DK or
HyperRAM on STM32H735G-DK).
– XiP from octo-SPI flash memory, data stored in internal SRAM.
– Boot ROM: execution from external SDRAM, data stored in internal SRAM.
Single core examples have the same structure:
• \Inc folder that contains all header files.
• \Src folder for the source code.
• \EWARM, \MDK-ARM, and \STM32CubeIDE folders contain the preconfigured project for each toolchain.
• readme.txt describing the example behavior and the environment required to make it work.
All dual-core examples have the same structure:
• Two separate folders CM4 and CM7 respectively for Arm® Cortex®-M4 and Arm® Cortex®-M7;
• Each folder (CM4 and CM7) provides:
– \Inc folder that contains all header files for Arm® Cortex®-M4/M7.
– \Src folder for the source code files for Arm® Cortex®-M4/M7.
• A \common folder with \Inc and \Src containing the common header and source files for both cores.

UM2204 - Rev 8 page 14/28


UM2204
STM32CubeH7 MCU Package overview

• \EWARM, \MDK-ARM, and \STM32CubeIDE folders contain the preconfigured project for each toolchain
(both Arm® Cortex®-M4 and Arm® Cortex®-M7 target configurations).

Figure 7. Dual core example structure

DT62384V2

Table 3 provides the number of examples, applications, and demonstrations available for each board.

UM2204 - Rev 8 page 15/28


UM2204
STM32CubeH7 MCU Package overview

Table 3. Number of examples available for each board

Templates Examples_L Examples_M Demonstrati


Board Templates Examples Applications
_LL L IX on

NUCLEO-
1 1 79 4 - 6 1
H743ZI
NUCLEO-
1 4 21 - - 2 1
H745ZI-Q
STM32H743I-
1 1 135 - - 54 1
EVAL
STM32H745I-
1 4 40 - - 13 1
DISCO
STM32H747I-
1 4 51 - - 17 4
DISCO
STM32H747I-
1 4 61 - - 27 4
EVAL
STM32H750B
- 2 13 - - 7 1
-DK
STM32H7B3I
1 1 70 - - 13 1
-EVAL
STM32H7B3I
1 1 34 1 1 17 1
-DK
NUCLEO-
1 1 53 13 3 13 1
H7A3ZI-Q
STM32H735
1 1 52 1 1 19 1
G-DK
NUCLEO-
1 1 38 33 3 10 1
H723ZG

UM2204 - Rev 8 page 16/28


UM2204
Getting started with STM32CubeH7

4 Getting started with STM32CubeH7

4.1 Running your first example


This section explains how simple it is to run a first example with STM32CubeH7. It uses as an illustration the
generation of a simple LED toggling example.
After downloading the STM32CubeH7 MCU package, unzip it into a directory of your choice, make sure not to
modify the package structure shown in Figure 5. Figure 4. STM32CubeH7 MCU Package structure
1. Case of a single core project, STM32H743I-EVAL board:
a. Browse to \\Projects\\STM32H743I-EVAL\\Examples.
b. Open \\GPIO, then the \\GPIO_EXTI folder.
c. Open the project with your preferred toolchain.
d. Rebuild all files and load your image into target memory.
e. Run the example: each time you press the Tamper push-button, the LED1 will toggle (for more details,
refer to the example readme file).
2. Case of a dual core project, example STM32H747I-EVAL board:
a. Browse to \\Projects\\STM32H747I-EVAL\\Examples.
b. Open \\GPIO, then the \\GPIO_EXTI folder.
c. Open the project with your preferred toolchain.
d. For each target STM32H747I_EVAL_CM4 and STM32H747I_EVAL_CM7 (respectively for Cortex®-M7
and Cortex®-M4):
i. Rebuild all files and load your image into target memory.
ii. After loading the two images, reset the board in order to boot (Cortex®-M7) and CPU2 (Cortex®-M4) at
once
iii. Each time you press the Tamper push-button, :
• LED1 toggles once (to indicated an EXTI interrupt for Cortex®-M7)
• LED3 toggles once (to indicated an EXTI interrupt for Cortex®-M4) (for more details, refer to the
example readme file)
3. Case of a Value line project running on STM32H750B-DK board:
a. Browse to Projects\\STM32H750B-DK\\Templates\ExtMem_Boot.
b. Open the ExtMem_Boot project with your preferred toolchain.
c. Rebuild all files and load your image into the target internal Flash memory.
d. Browse to \\Projects\\STM32H750B-DK\\Examples.
e. Open \\GPIO, then the \\GPIO_IOToggle folder.
f. Open the project with your preferred toolchain (keep the default configuration XIP_QSPI_InternalSRAM).
g. Rebuild all files and load your image into the external Quad-SPI Flash memory.
h. Run the example: LED1 will toggle infinitely (for more details, refer to the example readme file).
4. Case of a Value line project running on STM32H7B3I-DK board:
a. Browse to Projects\STM32H7B3I-DK\Applications\ExtMem_CodeExecution\ExtMem_Boot.
b. Open the ExtMem_Boot project with your preferred toolchain.
c. Rebuild all files and load your image into target internal Flash memory.
d. Browse to Projects\STM32H7B3I-DK\Applications\ExtMem_CodeExecution\ExtMem_Application.
e. Open LedToggling folder.
f. Open the project with your preferred toolchain (keep the default configuration XIP_OSPI_InternalSRAM).
g. Rebuild all files and load your image into the external Octo-SPI Flash memory.
h. Run the example: LED2 will toggle infinitely (for more details, refer to the example readme file).

UM2204 - Rev 8 page 17/28


UM2204
Getting started with STM32CubeH7

Note: • The principle of the STM32H750xx Value line applications is to execute the user application from an
external memory (Quad-SPI Flash memory or SDRAM, by default Quad-SPI Flash memory). The
Templates\ExtMem_Boot projects enables to boot from the STM32H750xx internal Flash memory,
configure external memories, and then jump to the user application located in an external memory of the
STM32H750B-DK board.
• The principle of the STM32H7B0xx Value line applications is to execute the user application from an
external memory (Octo-SPI Flash memory or SDRAM, by default Octo-SPI Flash memory). The
STM32H7B3I-DK\Applications\ExtMem_CodeExecution\ExtMem_Boot project enables to boot from the
STM32H7B0xx internal Flash memory, configure external memories, and then jump to the user
application located in an external memory of the STM32H7B3I-DK board.
• The principle of the STM32H730xx Value line applications is to execute the user application from an
external memory (Octo-SPI Flash memory or Octo-SPI HyperRAM, by default Octo-SPI Flash memory).
The STM32H735G-DK\Applications\ExtMem_CodeExecution\ExtMem_Boot project enables to boot from
the STM32H730xx internal Flash memory, configure external memories, and then jump to the user
application located in an external memory of the STM32H735G-DK board.
The following section provides a quick overview on how to open, build and run an example with the supported
toolchains.
• EWARM
1. Under the example folder, open the \\EWARM subfolder.
2. Open the Project.eww workspace. The workspace name may change from one example to another.
3. Rebuild all files: Project->Rebuild all.
4. Load project image: Project->Debug.
5. Run program: Debug->Go(F5).
• MDK-ARM
1. Under the example folder, open the \\MDK-ARM subfolder.
2. Open the Project.uvproj workspace. The workspace name may change from one example to another.
3. Rebuild all files: Project->Rebuild all target files.
4. Load project image: Debug->Start/Stop Debug Session.
5. Run program: Debug->Run (F5).
• STM32CubeIDE
1. Open the STM32CubeIDE toolchain.
2. Click File->Switch Workspace->Other and browse to the STM32CubeIDE workspace directory.
3. Click File->Import, select General->'Existing Projects into Workspace' and then click “Next.
4. Browse to the STM32CubeIDE workspace directory and select the project.
5. Rebuild all project files: select the project in the “Project explorer” window then click on Project->build
project menu.
Note: STM32CubeIDE projects are provided only for STM32H7B3I-EVAL, STM32H7B3I-DK, STM32H735G-DK,
NUCLEO-H7A3ZI-Q and NUCLEO-H723ZG boards

UM2204 - Rev 8 page 18/28


UM2204
Getting started with STM32CubeH7

4.2 Developing your own application

4.2.1 HAL application


This section describes the required steps needed to create your own application using STM32CubeH7.
1. Create your project: to create a new project you can either start from the Template project provided for each
board under \Projects\<STM32xx_xxx>\Templates or from any available project under
\Projects\<STM32xx_xxx>\Examples or \Projects\<STM32xx_xxx>\Applications (<STM32xx_xxx> refers to the
board name, ex. STM32H743I_EVAL).
The Template project provides an empty main loop function, it is a good starting point to get familiar with the
project settings for STM32CubeH7. The template has the following characteristics:
a. It contains sources of the HAL, CMSIS and BSP drivers which are the minimum required components to
develop code for a given board
b. It contains the include paths for all the firmware components
c. It defines the STM32H7 device supported, allowing to have the right configuration for the CMSIS and HAL
drivers
d. It provides ready-to-use user files preconfigured as follows:
◦ HAL is initialized
◦ SysTick ISR implemented for HAL_Delay() purpose
◦ System clock is configured with the maximum frequency of the device
Note: When copying an existing project to another location, make sure to update the include paths.
2. Add the necessary middleware to your project (optional): the available middleware stacks are: USB Host
and Device Libraries, STemWin, LibJPEG, FreeRTOS™, FatFS, LwIP, and mbedTLS. To find out which source
files you need to add to the project files list, refer to the documentation provided for each middleware, you may
also have a look at the applications available under \Projects\STM32xx_xxx\Applications\<MW_Stack>
(<MW_Stack> refers to the Middleware stack, for example USB_Device) to get a better idea of the source files
to be added and the include paths.
3. Configure the firmware components: the HAL and middleware components offer a set of build time
configuration options using macros declared with “#define” in a header file. A template configuration file is
provided within each component, it has to be copied to the project folder (usually the configuration file is
named xxx_conf_template.h. The word “_template” needs to be removed when copying it to the project
folder). The configuration file provides enough information to know the effect of each configuration option.
More detailed information is available in the documentation provided for each component.
4. Start the HAL Library: after jumping to the main program, the application code needs to call HAL_Init() API to
initialize the HAL Library, which does the following:
a. Configure the SysTick to generate an interrupt every 1ms. The SysTick is clocked by the HSI (default
configuration after reset).
b. Sets NVIC Group Priority to 4.
c. Calls the HAL_MspInit() callback function defined in user file stm32h7xx_hal_msp.c to do the global low
level hardware initialization.
5. Configure the system clock: the system clock configuration is done by calling the following APIs:
a. HAL_RCC_OscConfig(): configures the internal and/or external oscillators, PLL source and factors. The
user may select to configure one oscillator or all oscillators. The PLL configuration can be skipped if there
is no need to run the system at high frequency.
b. HAL_RCC_ClockConfig(): configures the system clock source, Flash latency and AHB and APB
prescalers.

UM2204 - Rev 8 page 19/28


UM2204
Getting started with STM32CubeH7

6. Peripheral initialization
a. Start by writing the peripheral HAL_PPP_MspInit function. For this function, proceed as follows:
◦ Enable the peripheral clock.
◦ Configure the peripheral GPIOs.
◦ Configure DMA channel and enable DMA interrupt (if needed).
◦ Enable peripheral interrupt (if needed).
b. Edit the stm32h7xx_it.c to call the required interrupt handlers (peripheral and DMA), if needed.
c. Write process complete callback functions if you plan to use peripheral interrupt or DMA.
d. In your main.c file, initialize the peripheral handle structure, then call the function HAL_PPP_Init() to
initialize your peripheral.
7. Develop your application process: at this stage, your system is ready and you can start developing your
application code.
a. The HAL provides intuitive and ready-to-use APIs for configuring the peripheral, and supports polling,
interrupt and DMA programming models, to accommodate any application requirements. For more details
on how to use each peripheral, refer to the rich examples set provided.
b. If your application has some real-time constraints, you can find a large set of examples showing how to
use FreeRTOS and integrate it with all middleware stacks provided within STM32CubeH7, it can be a good
starting point for your development.
Note: In the default HAL implementation, the SysTick timer is the timebase source. It is used to generate interrupts at
regular time intervals. If HAL_Delay() is called from peripheral ISR process, the SysTick interrupt must have
higher priority (numerically lower) than the peripheral interrupt. Otherwise, the caller ISR process is blocked.
Functions affecting timebase configurations are declared as __Weak to make override possible in case of other
implementations in user file (using a general purpose timer for example or other time source). For more details
please refer to HAL_TimeBase example.

4.2.2 LL application
This section describes the steps needed to create your own LL application using STM32CubeH7.
1. Create your project
To create a new project you either start from the Templates_LL project provided for each board under
\Projects\\Templates_LL or from any available project under \Projects\\Examples_LL ( refer to the board name,
such as NUCLEO-H743ZI). The Template project provides an empty main loop function, however it is a good
starting point to get familiar with project settings for STM32CubeH7.
The Template main characteristics are the following:
– It contains the source codes of the LL and CMSIS drivers which are the minimal components needed to
develop code on a given board.
– It contains the include paths for all the required firmware components.
– It selects the supported STM32H7 device and allows to configure the CMSIS and LL drivers accordingly.
– It provides ready-to-use user files, that are pre-configured as follows:
main.c: system clock configuration for maximum frequency.

UM2204 - Rev 8 page 20/28


UM2204
Getting started with STM32CubeH7

2. Port an existing project to another board


To port an existing project to another target board, start from the Templates_LL project provided for each
board and available under \Projects\\Templates_LL:
a. Select a LL example
To find the board on which LL examples are deployed, refer to the list of LL examples
STM32CubeProjectsList.html, to Table 3: Number of examples for each board or to application note
“STM32Cube firmware examples for STM32H7 Series” (AN5033)
b. Port the LL example
i. Copy/paste the Templates_LL folder (to keep the initial source, or directly update existing
Templates_LL project).
ii. Then porting consists principally in replacing Templates_LL files by the Examples_LL targeted project.
Keep all board specific parts. For reasons of clarity, board specific parts have been flagged with
specific tags:
/* ======== BOARD SPECIFIC CONFIGURATION CODE BEGIN ============== */
...
/* ============== BOARD SPECIFIC CONFIGURATION CODE END ========== */

Thus the main porting steps are the following:


1. Replace the stm32h7xx_it.h file
2. Replace the stm32h7xx_it.c file
3. Replace the main.h file and update it.
4. Replace the main.c file and update it
Thanks to these adaptations, the example should be functional on the targeted board.

4.3 Using STM32CubeMX to generate the initialization C code


An alternative to steps 1 to 6 described in Section 4.2: Developing your own application consists in using the
STM32CubeMX tool to easily generate code for the initialization of the system, the peripherals and middleware
(steps 1 to 6 above) through a step-by-step process:
1. Select the STMicroelectronics STM32 microcontroller that matches the required set of peripherals.
2. Configure each required embedded software thanks to a pinout-conflict solver, a clock-tree setting helper, a
power consumption calculator, and an utility performing MCU peripheral configuration (GPIO, USART...) and
middleware stacks (USB, TCP/IP...).
3. Generate the initialization C code based on the configuration selected. This code is ready to be used within
several development environments. The user code is kept at the next code generation.
For more information, please refer to “STM32CubeMX for STM32 configuration and initialization C code
generation” user manual (UM1718).

4.4 Getting STM32CubeH7 release updates


STM32CubeH7 MCU Package releases and patches are available from http://www.st.com/stm32h7.
They can be retrieved by clicking the CHECK FOR UPDATE menu within STM32CubeMX. For more details, refer
to Section 3 of "STM32CubeMX for STM32 configuration and initialization C code generation" user manual
(UM1718).

UM2204 - Rev 8 page 21/28


UM2204
FAQs

5 FAQs

What is the license scheme for the STM32CubeH7 MCU Package?


The HAL is distributed under a non-restrictive BSD (Berkeley Software Distribution) license.
The middleware stacks made by ST (USB Host and Device Libraries, STemWin) come with a licensing model
allowing easy reuse, provided it runs on an ST device.
The middleware based on well-known open-source solutions (FreeRTOS™, FatFs, LwIP and mbedTLS) have
user-friendly license terms. For more details, refer to the license agreement of each middleware.

What boards are supported by the STM32CubeH7 MCU Package?


The STM32CubeH7 MCU Package provides BSP drivers and ready-to-use examples for the following STM32H7
boards: NUCLEO-H723ZG, NUCLEO-H743ZI, NUCLEO-H745ZI-Q, NUCLEO-H7A3ZI-Q, STM32H743I-EVAL,
STM32H735G-DK, STM32H745I-DISCO, STM32H747I-DISCO, STM32H750B-DK, STM32H7B3I-DK,
STM32H747I-EVAL, and STM32H7B3I-EVAL.

Does the HAL take benefit from interrupts or DMA? How can this be controlled?
Yes. The HAL supports three API programming models: polling, interrupt and DMA (with or without interrupt
generation).

Are any examples provided with the ready-to-use toolset projects?


Yes. STM32CubeH7 provides a rich set of examples and applications (around 192 for STM32H743I-EVAL, 97 for
STM32H747I-EVAL ...). They come with the preconfigured project of several toolsets: IAR, Keil and GCC.

How are the product/peripheral specific features managed?


The HAL offers extended APIs, i.e. specific functions as add-ons to the common API to support features available
on some products/lines only.

How can STM32CubeMX generate code based on embedded software?


STM32CubeMX has a built-in knowledge of STM32 microcontrollers, including their peripherals and software.
This enables the tool to provide a graphical representation to the user and generate *.h/*.c files based on user
configuration.

How to get regular updates on the latest STM32CubeH7 firmware releases?


Refer to Section 4.4: Getting STM32CubeH7 release updates.

Does the HAL/LL drivers support all STM32H7 lines single core, dual core and value line ?
Yes the HAL/LL drivers support all the STM32H7 lines:
• “DUAL_CORE” define is used to delimit code (defines , functions, macros.. ) available only in dual core
line. This define is automatically available when user defines the right macro in stm32h7xx.h (see
Table 1. Macros for STM32H7 Series).
• “CORE_CM4” or “CORE_CM7” defines are respectively used to delimit configuration/code specific to
Cortex®‑M4/Cortex®-M7 core. It shall be added by user into compiler preprocessor symbols for each target
configuration (see Section 2.3: section "2.3 Level 2").
• Value line devices (STM32H750xx) are treated like single core devices.

What are the considerations to run a dual core example:

Make sure to compile and build both Cortex®-M7 and Cortex®-M4 targets, then load the corresponding images
into the the STM32H7 dual core device. Please refer to the readme.txt for each example.

UM2204 - Rev 8 page 22/28


UM2204
FAQs

What are the considerations to run a Value line example (STM32H750xx on STM32H750B-DK board,
STM32H7B0xx on STM32H7B3I-DK/STM32H7B3I-EVAL board, and STM32H730xx on STM32H735G-DK):
Make sure to compile, build and load the ExtMem_Boot into the internal Flash memory. Make sure that the target
external memory example (RAM/ROM) configuration is properly set in the ExtMem_Boot project memory.h file
(DATA_AREA/CODE_AREA). Make sure to compile, build and load the application into the external memory. For
more details please refer to the readme.txt of the STM32H750B-DK board ExtMem_Boot and Template_Project
templates.

UM2204 - Rev 8 page 23/28


UM2204

Revision history
Table 4. Document revision history

Date Revision Changes

26-Apr-2017 1 Initial release.


Updated number of applications for both boards in Section 3.2 and Section 5 FAQs .
29-Aug-2017 2
Updated Figure 8 STM32CubeH7 example overview.
Updated Introduction to replace STMCube™ by STM32Cube™ and update STM32Cube logo.
Updated Section 1 STM32Cube main features.
Firmware package replaced by MCU Package in the whole document.

21-Jun-2018 3 Changed STM32H743I_EVAL into STM32H743I-EVAL in the whole document when referring to the
board name.
Added STM32H750xx part numbers in Table 1 Macros for STM32H7 Series and Table 2 Evaluation,
Discovery and Nucleo boards for STM32H7 Series.
Updated number of STM32H743I-EVAL examples in Section 3.2 and Section 5 FAQs.
03-Jul-2018 4 Updated Figure 2 STM32CubeH7 firmware components.
Major update consisting in the introduction of the low-layer (LL) API and affecting all sections of the
03-Apr-2019 5
document.
Updated Section Introduction.
Replaced QSPI Flash memory by Quad-SPI Flash memory.
12-Nov-2019 6
Added support for STM32H7A3/B3 devices through STM32H7B3I-EVAL, STM32H7B3I-DK and
NUCLEO-H7A3ZI-Q boards.
Added STM32H723xx, STM32H733xx, STM32H725xx, STM32H735 and STM32H730xx part
numbers in Table 1. Macros for STM32H7 Series.
Added NUCLEO-H723ZG and STM32H735G-DK in Table 2. Evaluation, Discovery and Nucleo
boards for STM32H7 Series.
Section 3.2: MCU Package overview:
• Added STM32H735G-DK and NUCLEO-H723ZG to the list of boards for which projects for
SW4STM32 toolchain are not provided, to the list of boards for which template projects are
available, and to Figure 5. STM32CubeH7 MCU Package structure.
28-Apr-2020 7 • Added STM32H730 Value line to the paragraph related to ExtMem_CodeExecution
applications.
• Updated Table 3. Number of examples available for each board.
Section 4.1: Running your first example:
• Added note related to STM32H730xx Value line applications.
• Added STM32H735G-DK and NUCLEO-H723ZG to the list of boards for which
STM32CubeIDE projects are provided.
UpdatedSection 4.4: Getting STM32CubeH7 release updates.
Updated Section 5: FAQs.
Updated:
• Document title.
• Introduction.
• Figure 1. STM32CubeH7 firmware components.
• Section 3.2: MCU Package overview.
21-Dec-2023 8
• Figure 5. STM32CubeH7 MCU Package structure.
• Figure 6. STM32CubeH7 example overview.
• Figure 7. Dual core example structure.
• Section 4.1: Running your first example.
Removed all references to SW4STM32 and replaced them with STM32CubeIDE.

UM2204 - Rev 8 page 24/28


UM2204
Contents

Contents
1 STM32CubeH7 main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 STM32CubeH7 architecture overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1 Level 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.1 Board support package (BSP). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.2 Hardware abstraction layer (HAL) and low-layer (LL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.3 Basic peripheral usage examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Level 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.1 Middleware components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2.2 Examples based on the middleware components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 Level 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 STM32CubeH7 MCU Package overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1 Supported STM32H7 devices and hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 MCU Package overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 Getting started with STM32CubeH7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
4.1 Running your first example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Developing your own application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.1 HAL application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2.2 LL application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.3 Using STM32CubeMX to generate the initialization C code . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.4 Getting STM32CubeH7 release updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5 FAQs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24
List of tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26
List of figures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27

UM2204 - Rev 8 page 25/28


UM2204
List of tables

List of tables
Table 1. Macros for STM32H7 Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Table 2. Evaluation, Discovery and Nucleo boards for STM32H7 Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Table 3. Number of examples available for each board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Table 4. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

UM2204 - Rev 8 page 26/28


UM2204
List of figures

List of figures
Figure 1. STM32CubeH7 firmware components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Figure 2. STM32CubeH7 firmware architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Figure 3. Dual core project architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Figure 4. Dual core project linker file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Figure 5. STM32CubeH7 MCU Package structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 6. STM32CubeH7 example overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Figure 7. Dual core example structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

UM2204 - Rev 8 page 27/28


UM2204

IMPORTANT NOTICE – 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 acknowledgment.
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, 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.
© 2023 STMicroelectronics – All rights reserved

UM2204 - Rev 8 page 28/28

You might also like