STM32CubeMP2 Package architecture

Revision as of 09:57, 1 December 2023 by Registered User
Applicable for STM32MP25x lines


1. Article purpose[edit source]

This article introduces STM32CubeMP25 Package / STM32CubeMP2 Package (a.k.a., STM32CubeMP25 / STM32CubeMP2) architecture based on the Arm® Cortex®-M33 processor, acting as coprocessor of the Arm® Cortex®-35.

2. Architecture overview[edit source]

The STM32CubeMP25 Package gathers together, in a single package, all the generic embedded software components required to develop applications on top of Arm® Cortex®-M33 microprocessors.

On top of the hardware, the STM32CubeMP25 Package solution is built around three levels of software components (Level 0 for Drivers, level 1 for Middleware. Level 2 for Boards demonstrations), that interact easily with each other. It also includes 2 common components CMSIS and Utilities which interact with all two levels.

STM32CubeMP25 Package Architecture Block Diagram.png


Info white.png Information
Notes:

3. Level 0 (Drivers)[edit source]

This level is divided into three software components:

  • Hardware Abstraction Layer (HAL)
  • Low Layer (LL)
  • Board Support Package (BSP)

3.1. HAL drivers[edit source]

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 which simplify user application implementation by providing ready-to-use processes.

As example, for the communication peripherals (I2C, UART…), they include APIs allowing to initialize and configure the peripheral, to manage data transfer based on polling, interrupt or DMA process, and to handle communication errors that may raise during communication.

Info white.png Information
Note:

3.1.1. HAL drivers overview[edit source]

The HAL APIs layer is composed of native and extended APIs set. It is directly built around a generic architecture and allows the build-upon layers, like the middleware layer, to implement its functions without in-depth knowledge about the used STM32 device. This improves the library code reusability and guarantees an easy portability on 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.
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 compliancy level with most of the clients available on the market (stacks) called native APIs and embed also some extended functionalities for special services or a combination of several features offered by the STM32 peripherals

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 customized functions for a specific family or a specific part number

3.1.2. List of HAL drivers[edit source]

The list of HAL drivers available for STM32MP2xx family is accessible in HAL drivers.

3.2. LL drivers[edit source]

The Low Layer (LL) drivers offer a fast light-weight expert-oriented layer which is closer to the hardware than the HAL. The LL APIs are available only for a set of peripherals.

3.2.1. LL drivers overview[edit source]

The Low Layer (LL) drivers are part of the STM32CubeMPU firmware HAL that provides 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 application level,
  • Fully independent from HAL and can be used in standalone usage (without HAL drivers),
  • Full feature coverage of all the supported peripherals.

3.2.2. List of LL drivers[edit source]

The list of LL drivers available for STM32MP2xx family is accessible in LL drivers.


3.3. BSP drivers[edit source]

The BSP drivers are firmware components based on the HAL drivers and provide a set of APIs relative to the hardware components in the evaluation boards coming with the STM32Cube Package. All examples and applications given with the STM32Cube are based on these BSP drivers.

3.3.1. BSP drivers overview[edit source]

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 EVAL Drivers ,
  • Intuitive functionalities based on high level use case,
  • Portable BSP drivers for different external devices.

3.3.2. List of BSP drivers[edit source]

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


4. Level 1 (Middlewares)[edit source]

Middleware components are a set of libraries providing a set of services. STM32CubeMP25 Package offers 2 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.

4.1. OpenAMP[edit source]

OpenAMP [1] is a library implementing the Remote Processor Service framework (RPMsg) which is a messaging mechanism to communicate with a remote processor.

  • Load and control Arm® Cortex®-M33 firmware
  • Inter processor communication
Info white.png Information
Note: