1. Article purpose
This article introduces STM32CubeMP13 package architecture based on the Arm® Cortex®-A7 processor.
- Refer to STM32CubeMP13 Package - Getting started article to get started.
2. Architecture overview
The STM32CubeMP13 package gathers all the generic embedded software components required to develop applications on top of Arm® Cortex®-A7 microprocessors in a single package.
On top of the hardware, the STM32CubeMP13 package solution is built around three levels of software components (level 0 for drivers, level 1 for middleware, and level 2 for board demonstrations) that interact easily with each other. It also includes two common components, CMSIS and Utilities, which interact with all three levels.
![]() |
|
3. Boot architecture overview
The boot chain of the STM32CubeMP13 package running on Arm® Cortex®-A7 core is explained in STM32CubeMP13 package - boot architecture.
4. Level 0 (Drivers)
This level is divided into three software components:
- Hardware Abstraction Layer (HAL)
- Low Layer (LL)
- Board Support Package (BSP)
4.1. HAL drivers
The HAL drivers provide the low-level drivers and the hardware interfacing methods to interact with the upper layers (application, libraries, and stacks). They provide generic, multi-instance and function-oriented APIs that simplify user application implementation by providing ready-to-use processes.
For example, for the communication peripherals (I2C, UART…), they include APIs that allow initializing and configuring the peripheral, managing data transfer based on polling, interrupt, or DMA process, and handling communication errors that may arise during communication.
![]() |
Note:
|
4.1.1. HAL drivers overview
The HAL API layer is composed of native and extended API sets. It is directly built around a generic architecture and allows the build-upon layers, like the middleware layer, to implement their functions without in-depth knowledge about the used STM32 device. This improves the library code reusability and guarantees easy portability to other devices and STM32 families.
Contrary to the low-layer drivers (see Low Layer section), the HAL ones are functionality-oriented and not internal peripheral-oriented. For example, for the Timer peripheral, the APIs could be split into several categories following the functions offered by the internal peripherals (basic timer, capture, PWM, etc.).
The HAL drivers are a set of common APIs with a high compliance level with most of the clients available on the market (stacks) called native APIs and also embed some extended functionalities for special services or a combination of several features offered by the STM32 peripherals.
The HAL driver APIs are split into two categories:
- Generic APIs, which provide common and generic functions to all the STM32 series.
- Extension APIs, which provide specific customized functions for a specific family or a specific part number.
4.1.2. List of HAL drivers
The list of HAL drivers available for STM32MP13xx family is accessible in HAL drivers.
4.2. LL drivers
The low-layer (LL) drivers offer a fast, lightweight, expert-oriented layer that is closer to the hardware than the HAL. The LL APIs are available only for a set of peripherals.
4.2.1. LL drivers overview
The low-layer (LL) drivers are part of the STM32CubeMPU firmware HAL that provides a basic set of optimized and one-shot services. The low-layer drivers, contrary to the HAL ones, are not fully portable across the STM32 families; the availability of some functions depends on the physical availability of the relative features on the product.
The low-layer (LL) drivers are designed to offer the following features:
- New set of inline functions for direct and atomic register access
- One-shot operations that can be used by the HAL drivers or from the application level
- Fully independent from HAL and can be used in standalone usage (without HAL drivers)
- Full feature coverage of all the supported peripherals
4.2.2. List of LL drivers
The list of LL drivers available for STM32MP13xx family is accessible in LL drivers.
4.3. BSP drivers
The BSP drivers are firmware components based on the HAL drivers and provide a set of APIs related to the hardware components in the discovery boards included with the STM32Cube package. All examples and applications provided with the STM32Cube are based on these BSP drivers.
4.3.1. BSP drivers overview
The BSP architecture proposes a new model that prevents some standard library weaknesses and provides more features:
- Portable external resources code (components): the external components could be used by all STM32 families,
- Multiple use of hardware resources without duplicated initialization: example: I2C Physical Layer could be used for several DISCO Drivers,
- Intuitive functionalities based on high level use case,
- Portable BSP drivers for different external devices.
4.3.2. List of BSP drivers
The BSP drivers offer a set of APIs relative to the hardware components available in the hardware boards (LEDs, Buttons and COM port). Refer to BSP_drivers
5. Level 1 (Middlewares)
Middleware components are a set of libraries providing a set of services. STM32CubeMP13 Package offers main components :
Each middleware component is mainly composed of:
Library core
: This is the core of a component; it manages the main library state machine and the data flow between the several modules.Interface layer
: The interface layer is generally used to link the component core with the lower layers like the HAL and the BSP drivers.
5.1. Azure RTOS
Azure® RTOS is a professional-grade, highly reliable, and market-proven middleware suite. With Azure® RTOS complementing the extensive STM32Cube ecosystem, which provides free development tools, software bricks, and software expansion packages, STM32 users can also leverage the rich services of Azure® RTOS, which meet the needs of tiny, smart, connected devices. More information about the general STM32Cube offer can be found on the STMicroelectronics website.
![]() |
Note:
|
5.2. Free RTOS
Free RTOS middleware is supported in STM32CubeMP13 firmware package beginning from v1.2.0.
Two demo examples are provided based on Free RTOS included in Firmware.
For more information refer Free RTOS Release Notes and visit Free RTOS site.
5.3. LwIP
LwIP is a small independent implementation of the TCP/IP protocol suite. LwIP stack working based on ETH internal peripheral, STM32CubeMP13 includes Lwip examples, listed here - Projects/STM32MP135C-DK/Applications/LwIP For more information refer LwIP Release Notes .
5.4. STM32 USB host library
The STM32Cube™ USB host library middleware module is part of the STM32Cube firmware package. The USB host library sits on top of the STM32Cube USB host HAL driver. This library offers the APIs used to access USB devices of various classes.
The USB host module can be used for the implementation of the major USB classes:
- Mass-storage class (MSC)
- Human interface device class (HID)
- Communication device class (CDC)
- Audio class (AUDIO)
- Media transfer protocol class (MTP)
In addition to the above-listed classes, users can build their own class using the available library APIs.
The library is built with the possibility to work in standalone mode or in RTOS mode. The library also supports multi-instance, as it can work simultaneously on two or more USB host peripherals.
For complete information, refer to the user manual UM1720 and Release_Notes.html
5.5. STM32 USB Device Library
STM32Cube™ USB device library middleware module is part of the STM32CubeMP13 package. The USB device library comes on top of the STM32Cube™ USB device HAL driver and offers all the APIs required to develop a USB device application.
The USB device library is a part of STM32Cube™ package for each STM32 Series. It contains:
- The USB low level driver
- Commonly used USB class drivers
- A set of applications for the most common USB device classes supporting USB Full speed and High speed transfer types (control, interrupt, bulk and isochronous).
For complete information, refer to user manual UM1734 and Release_Notes.html
6. Level 2 (Boards demonstrations)
The Boards demonstrations level is composed of a single layer that provides all examples
and applications
. It also includes all STM32CubeIDE projects for each supported board as well as templates
source files.
There are four kinds of projects demonstrating different usages of software APIs from level 0 (Drivers) and level 1 (Middleware):
Examples
projects showing how to use HAL APIs and low-layer drivers, if any (Level 0), with very basic usage of BSP layer (buttons and LEDs in general)Applications
projects showing how to use the middleware components (Level 1) and how to integrate them with the hardware and BSP/HAL layers (Level 0). These applications could be hybrid and use several other middleware components.External loader
projects showing how to program the images serially into external memory and boot from external memory.Templates projects
are basic user applications including STM32CubeIDE projects files, which could be used to start a custom project.
![]() |
|
7. CMSIS
The Cortex Microcontroller Software Interface Standard (CMSIS) is a vendor-independent hardware abstraction layer for the Arm® Cortex®-A7 processor series.
- Refer to CMSIS[1] to get more information on the CMSIS component.
The CMSIS component also provides specific common resources for device support. It enables consistent and simple software interfaces to the processor and the peripherals, simplifying software reuse, reducing the learning curve for microcontroller developers, and reducing the time to market for new devices
This vendor part is called CMSIS Device
and it provides interrupt list, peripherals registers description, and associated defines for all registers bit fields.
- CMSIS structure overview:
Device CMSIS Device │ │ └── ST │ │ │ └── STM32MP13xx Common ressources for STM32MP13xx family │ ├── Documentation │ │ ├── index.html │ ├── DSP │ │ ├── ComputeLibrary │ │ ├── Examples │ │ ├── Include │ │ ├── Platforms │ │ ├── PrivateInclude │ │ ├── PythonWrapper │ │ ├── Scripts │ │ └── Source │ │ └── Testing │ │ └── Toolchain │ │ └── armac5.cmake │ │ └── armac6.cmake │ │ └── cmsisdspconfig.py │ │ └── config.cmake │ │ └── configBoot.cmake │ │ └── configCore.cmake │ │ └── configLib.cmake │ │ └── configPlatform.cmake │ │ └── filterLinkScript.py │ │ └── gcc.cmake │ │ └── README.md │ ├── Include │ │ ├── cachel1_armv7.h │ │ ├── cmsis_armcc.h │ │ ├── cmsis_armclang.h │ │ ├── cmsis_armclang_ltm.h │ │ ├── cmsis_compiler.h │ │ ├── cmsis_gcc.h │ │ ├── cmsis_iccarm.h │ │ ├── cmsis_version.h │ │ ├── core_armv8mbl.h │ │ ├── core_armv8mml.h │ │ ├── core_armv81mml.h │ │ ├── core_cm0.h │ │ ├── core_cm0plus.h │ │ ├── core_cm1.h │ │ ├── core_cm3.h │ │ ├── core_cm4.h │ │ ├── core_cm7.h │ │ ├── core_cm23.h │ │ ├── core_cm33.h │ │ ├── core_cm35p.h │ │ ├── core_cm55.h │ │ ├── core_sc000.h │ │ ├── core_sc300.h │ │ ├── mpu_armv7.h │ │ ├── mpu_armv8.h │ │ ├── pmu_armv8.h │ │ └── tz_context.h │ ├── NN │ │ ├── Include │ │ ├── Scripts │ │ ├── Source │ │ ├── .clang-format │ │ ├── CMakeLists.txt │ │ ├── README.md │ ├── RTOS │ │ └── Template │ └── RTOS2 │ ├── Include │ ├── Source │ └── Template │ ├── ARM.CMSIS.pdsc │ ├── LICENSE.txt │ ├── README.md├── CMSIS │ ├── Core │ │ ├── Include │ │ └── Template │ ├── Core_A │ │ ├── Include │ │ └── Source │ ├──
- CMSIS Device structure :
stm32mp131axx_ca7.h --> Added "as example" │ │ │ │ │ ├── stm32mp131cxx_ca7.h --> Added "as example" │ │ │ │ │ ├── stm32mp131dxx_ca7.h --> Added "as example" │ │ │ │ │ ├── stm32mp131fxx_ca7.h --> Added "as example" │ │ │ │ │ ├── stm32mp133axx_ca7.h --> Added "as example" │ │ │ │ │ ├── stm32mp133cxx_ca7.h --> Added "as example" │ │ │ │ │ ├── stm32mp133dxx_ca7.h --> Added "as example" │ │ │ │ │ ├── stm32mp133fxx_ca7.h --> Added "as example" │ │ │ │ │ ├── stm32mp135axx_ca7.h --> Added "as example" │ │ │ │ │ ├── stm32mp135cxx_ca7.h --> Added "as example" │ │ │ │ │ ├── stm32mp135dxx_ca7.h --> Added "as example" │ │ │ │ │ ├── stm32mp135fxx_ca7.h │ │ │ │ │ ├── system_stm32mp13xx_A7.h │ │ │ │ └── Source │ │ │ │ │ │ └── gcc linker files and startup files (memory mapping) │ │ │ │ │ │ │ └── linker │ │ │ │ │ │ │ │ ├── stm32mp13xx_a7_ddr.ld │ │ │ │ │ │ │ │ ├── stm32mp13xx_a7_sysram.ld │ │ │ │ │ │ │ ├── startup_stm32mp131axx_ca7.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp131axx_ca7_azurertos.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp131cxx_ca7.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp131cxx_ca7_azurertos.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp131dxx_ca7.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp131dxx_ca7_azurertos.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp131fxx_ca7.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp131fxx_ca7_azurertos.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp133axx_ca7.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp133axx_ca7_azurertos.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp133cxx_ca7.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp133cxx_ca7_azurertos.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp133dxx_ca7.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp133dxx_ca7_azurertos.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp133fxx_ca7.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp133fxx_ca7_azurertos.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp135axx_ca7.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp135axx_ca7_azurertos.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp135cxx_ca7.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp135cxx_ca7_azurertos.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp135dxx_ca7.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp135dxx_ca7_azurertos.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp135fxx_ca7.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp135fxx_ca7_azurertos.c --> Added "as example" │ │ │ │ │ │ │ ├── startup_stm32mp135c_ca7.c │ │ │ │ │ │ │ ├── startup_stm32mp135c_ca7_azurertos.c │ │ │ │ │ │ ├── mmu_stm32mp13xx_A7.c │ │ │ │ │ │ ├── system_stm32mp13xx_A7.c │ │ │ │ │ │ ├──system_stm32mp13xx_A7_azurertos.c │ │ │ │ ├── LICENSE.md │ │ │ │ ├── LICENSE.txt │ │ │ │ ├── Release_Notes.html├── CMSIS │ ├── Device CMSIS Device │ │ └── ST │ │ │ └── |STM32MP13xx Common resources for STM32MP13xx family │ │ │ └── _htmresc │ │ │ │ └──Include Device resources definition │ │ │ │ │ ├── stm32mp13xx.h │ │ │ │ │ ├──
8. References