This article introduces the structure and the content of the STM32CubeMP2 package, the embedded software part of STM32Cube™. This embedded software supports running on the Arm® Cortex®-M33 coprocessor and Arm® Cortex®-M0+ coprocessor present only on STM32MP25x lines . It references also other interesting wiki articles to better understand and use the STM32CubeMP2 package.
1. What is the STM32CubeMP2 package[edit | edit source]
STM32CubeMP2 Package, running on the Arm® Cortex®-M33 processor, consists of:
- The hardware abstraction layer (HAL), enabling portability between different STM32 devices via standardized API calls
- The low-layer API (LL), a light-weight, optimized, expert oriented set of APIs designed for runtime efficiency and so enhanced performance
- The board support package drivers (BSP), based on HAL drivers, an API set for the evaluation board and third-party components
- A collection of middleware components (such as FreeRTOS)
- A collection of examples, running on an MPU board and allowing demonstration of a basic implementation of features from a set of IPs
![]() |
The HAL, LL and BSP are equally applicable for [| Arm® Cortex®-M0+ coprocessor] which is present on STM32MP25x lines ![]() |
STM32CubeMP2 package uses components such as OpenAMP and ResourceManager that allow easy communication and resource sharing between main processors running with Linux on Arm® Cortex®-A35, and MCU coprocessors running on Arm® Cortex®-M33.
- OpenAMP is a library implementing the remote processor service framework (RPMsg) which is a virtio-based messaging bus that allows a local processor to communicate with remote processors available on the system.
- ResourceManager is a utility that handles peripheral-accessibility requests and system-resource configuration.
![]() |
Note:
|
2. Software architecture overview[edit | edit source]
Software architecture overview is described in STM32CubeMP2 Package architecture.
3. STM32CubeMP2 Package structure[edit | edit source]
This chapter describes the structure of the STM32CubeMP2 Package (drivers, middleware components, etc.).
STM32CubeMP2 Package offers a highly portable hardware abstraction layer (HAL), built around a generic and modular architecture.
This HAL allows the upper layers, which are middleware and application, to implement functions whenever STM32MP25/23 device is used. This improves the library code reusability and guarantees easy portability from one device to another. STM32CubeMP2 Package also offers a highly portable low layer interface (LL), which allows a quick, simple, and optimized API to access the STM32MP2 registers.
The STM32CubeMP2 Package is provided with the structure shown below.
4. STM32CubeMP2 Package content[edit | edit source]
This chapter describes the content of the STM32CubeMP2 Package (drivers, middleware components, etc.).
4.1. Drivers[edit | edit source]
The Drivers folder contains all the STM32Cube Drivers, including BSP and HAL drivers.
The STM32CubeMP2 Package provides all driver user manuals:
- The BSP user manual for STM32MP257x-EV1 Evaluation board
is available in Drivers/BSP/STM32MP257F-EV1/STM32MP257F-EV1_BSP_User_Manual.chm
- The BSP user manual for STM32MP257x-DK Discovery kit
is available in Drivers/BSP/STM32MP257F-DK/STM32MP257F-DK_BSP_User_Manual.chm
- The HAL user manual is available in Drivers/STM32MP2xx_HAL_Driver/STM32MP257Cxx_CM33_User_Manual.chm
The following chapters give the list of available BSP, HAL, and LL drivers.
4.1.1. HAL drivers[edit | edit source]
STM32CubeMP2 HAL Driver items | Description | CM33 | CM0+ |
---|---|---|---|
ADC |
* This driver provides firmware functions to manage the following * functionalities of the analog to digital convertor (ADC) * peripheral: * + Initialization and deinitialization functions * ++ Initialization and configuration of ADC * + Operation functions * ++ Start, stop, get result of conversions of regular * group, using 3 possible modes: polling, interruption or DMA. * + Control functions * ++ Channels configuration on regular group * ++ Analog watchdog configuration * + State functions * ++ ADC state machine management * ++ Interrupts and flags management |
YES | NO |
ADC_EX |
* This driver provides firmware functions to manage the following * extended functionalities of the analog to digital convertor (ADC) * peripheral: * + Operation functions * ++ Start, stop, get result of conversions of ADC group injected, * using 2 possible modes: polling, interruption. * ++ Calibration * +++ ADC automatic self-calibration * +++ Calibration factors get or set * ++ Multimode feature when available * + Control functions * ++ Channels configuration on ADC group injected * + State functions * ++ ADC group injected contexts queue management |
YES | NO |
BSEC |
* This driver provides firmware functions to manage the following * functionalities of the boot and security and OTP control(BSEC) peripheral: * + Initialization and deinitialization functions * + Peripheral control functions * + Peripheral state functions |
YES | NO |
CRC |
* This driver provides firmware functions to manage the following * functionalities of the cyclic redundancy check (CRC) peripheral: * + Initialization and deinitialization functions * + Peripheral control functions * + Peripheral state functions * + Extended features functions |
YES | NO |
CRYP |
* This driver provides firmware functions to manage the following * functionalities of the cryptography (CRYP) peripheral: * + Initialization and deinitialization functions * + AES processing functions * + DES processing functions * + TDES processing functions * + DMA callback functions * + CRYP IRQ handler management * + Peripheral state functions |
YES | NO |
CRYP_EX |
* This driver provides firmware functions to manage the following * functionalities of CRYP extension peripheral: * + Extended AES processing functions |
YES | NO |
DCACHE |
* This file provides firmware functions to manage the following * functionalities of the DCACHE. * + Initialization and configuration * + Cache coherency command * + Monitoring management |
YES | NO |
DCMI |
* This file provides firmware functions to manage the following * functionalities of the digital camera interface (DCMI) peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral control functions * + Peripheral state and error functions |
YES | NO |
DCMIPP |
* This driver provides firmware functions to manage the following * functionalities of the DCMIPP (digital camera interface pixel pipeline) peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral control functions * + Peripheral state and error functions |
YES | NO |
DMA |
* This driver provides firmware functions to manage the following * functionalities of the direct memory access (DMA) peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral state and errors functions |
YES | YES |
DMA_EX |
* This driver provides firmware functions to manage the following * functionalities of the DMA extension peripheral: * + Extended features functions |
YES | NO |
DSI |
* This file provides firmware functions to manage the following * functionalities of the DSI peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral control functions * + Peripheral state and errors functions |
YES | NO |
ETH |
* This driver provides firmware functions to manage the following * functionalities of the Ethernet (ETH) peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral control functions * + Peripheral state and errors functions |
YES | NO |
EXTI |
* This driver provides firmware functions to manage the following * functionalities of the general purpose input/output (EXTI) peripheral: * + Initialization and deinitialization functions * + I/O operation functions |
YES | YES |
FDCAN |
* This driver provides firmware functions to manage the following * functionalities of the flexible datarate controller area network * (FDCAN) peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral configuration and control functions * + Peripheral state and error functions |
YES | NO |
GPIO |
* This driver provides firmware functions to manage the following * functionalities of the general purpose input/output (GPIO) peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Extended peripheral control functions |
YES | YES |
HAL |
* This driver provides firmware functions to manage the following * functionalities of HAL, Tick, SYSCFG, DBGMCU: * + Initialization and deinitialization functions * + HAL initialization and deinitialization functions * + Configure the source of the time base * + HAL control functions * + Tick management (get/set/inc/priority/suspend/resume) * + Get HAL revision, the device revision identifier, the device identifier * + Enable/disable DBG wake up on AIEC * + Enable/disable the debug module during Domain1 SLEEP mode * + Enable/Disable the debug module during Domain1 STOP mode * + Enable/Disable the debug module during Domain1 STANDBY mode * + Configure the internal voltage reference buffer voltage scale * + Configure the internal voltage reference buffer high impedance mode * + Tune the internal voltage reference buffer (VREFBUF) * + Enable/disable the internal voltage reference buffer (VREFBUF) * + Ethernet PHY interface selection either MII or RMII * + Analog switch control for dual analog pads * + Enable/disable the booster to reduce the total harmonic distortion of the analog * + Enable/power-down the I/O compensation cell * + To Enable/disable optimize the I/O speed when the product voltage is low * + Code selection for the I/O compensation cell |
YES | YES |
HASH |
* This driver provides firmware functions to manage the following * functionalities of the HASH peripheral: * + Initialization and deinitialization methods * + HASH or HMAC processing in polling mode * + HASH or HMAC processing in interrupt mode * + HASH or HMAC processing in DMA mode * + Peripheral state methods * + HASH or HMAC processing suspension/resumption |
YES | NO |
HASH_EX |
* This driver provides firmware functions to manage the following * functionalities of the HASH peripheral for SHA-224 and SHA-256 * algorithms: * + HASH or HMAC processing in polling mode * + HASH or HMAC processing in interrupt mode * + HASH or HMAC processing in DMA mode * Additionally, this file provides functions to manage HMAC * multibuffer DMA-based processing for MD-5, SHA-1, SHA-224 * and SHA-256. |
YES | NO |
HSEM |
* This file provides firmware functions to manage the following * functionalities of the semaphore peripheral: * + Semaphore take function (2-Step procedure) , non blocking * + Semaphore fastTake function (1-Step procedure) , non blocking * + Semaphore status check * + Semaphore clear key set and get * + Release and release all functions * + Semaphore notification enabling and disabling and callback functions * + IRQ handler management |
YES | YES |
ICACHE |
* This file provides firmware functions to manage the following * functionalities of the instruction cache (ICACHE). * + Initialization and configuration * + Invalidate functions * + Monitoring management * + Memory address remap management |
YES | NO |
IPCC |
* This file provides firmware functions to manage the following * functionalities of the inter-processor communication controller * peripherals (IPCC). * + Initialization and deinitialization functions * + Configuration, notification, and interrupts handling * + Peripheral state and error functions |
YES | YES |
I2C |
* This driver provides firmware functions to manage the following * functionalities of the inter integrated circuit (I2C) peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral state and errors functions |
YES | YES |
I2C_EX |
* This driver provides firmware functions to manage the following * functionalities of I2C extended peripheral: * + Filter mode functions * + WakeUp mode functions * + FastModePlus functions |
YES | YES |
I2S |
* This file provides firmware functions to manage the following * functionalities of the integrated interchip sound (I2S) peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral state and errors functions |
YES | NO |
I3C |
* This file provides firmware functions to manage the following * functionalities of the improvement inter integrated circuit (I3C) peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral state and errors functions |
YES | YES |
IWDG |
* This file provides firmware functions to manage the following * functionalities of the independent watchdog (IWDG) peripheral: * + Initialization and start functions * + I/O operation functions |
YES | YES |
LPTIM |
* This driver provides firmware functions to manage the following * functionalities of the low power timer (LPTIM) peripheral: * + Initialization and deinitialization functions. * + Start/Stop operation functions in polling mode. * + Start/Stop operation functions in interrupt mode. * + Reading operation functions. * + Peripheral state functions. |
YES | YES |
LTDC |
* This file provides firmware functions to manage the following * functionalities of the LTDC peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral control functions * + Peripheral state and errors functions |
YES | NO |
MMC |
* This driver provides firmware functions to manage the following * functionalities of the secure digital (MMC) peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral control functions * + MMC card control functions |
YES | NO |
MMC_EX |
* This driver provides firmware functions to manage the following * functionalities of the secure digital (MMC) peripheral: * + Extended features functions |
YES | NO |
PKA |
* This driver provides firmware functions to manage the following * functionalities of public key accelerator (PKA): * + Initialization and deinitialization functions * + Start an operation * + Retrieve the operation result |
YES | NO |
PSSI |
* This file provides firmware functions to manage the following * functionalities of the parallel synchronous slave interface (PSSI) peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral state and errors functions |
YES | NO |
PWR |
* This driver provides firmware functions to manage the following * functionalities of the power controller (PWR) peripheral: * + Initialization and deinitialization functions * + Peripheral control functions * + Peripheral extended features functions |
YES | NO |
PWR_EX |
* This driver provides firmware functions to manage the following * functionalities of PWR extension peripheral: * + Peripheral extended features functions |
YES | NO |
OSPI |
* This driver provides firmware functions to manage the following * functionalities of the OSPI interface (OSPI). * + Initialization and deinitialization functions * + Indirect functional mode management * + Memory-mapped functional mode management * + Auto-polling functional mode management * + Interrupt and flag management * + HPDMA channel configuration for indirect functional mode * + Error management and abort functionality |
YES | NO |
RAMCFG |
* This file provides firmware functions to manage the following * functionalities of the RAM configuration controller peripheral: * + RAMCFG initialization and deinitialization functions. * + RAMCFG ECC operation functions. * + RAMCFG CRC operation functions. * + RAMCFG configure wait state functions. * + RAMCFG write protection functions. * + RAMCFG erase operation functions. * + RAMCFG handle interrupt and callbacks functions. * + RAMCFG state and error functions. |
YES | NO |
RCC |
* This driver provides firmware functions to manage the following * functionalities of the reset and clock control (RCC) peripheral: * + Initialization and deinitialization functions * + Peripheral control functions * + Extended peripheral control functions |
YES | NO |
RCC_EX |
* This driver provides firmware functions to manage the following * functionalities RCC extension peripheral: * + Extended peripheral control functions |
YES | NO |
RIF |
* This file provides firmware functions to manage the following * functionalities of RIF: * + RISC initialization and configuration functions * + IAC initialization and configuration functions |
YES | NO |
RNG |
* This driver provides firmware functions to manage the following * functionalities of the random number generator (RNG) peripheral: * + Initialization and configuration functions * + Peripheral control functions * + Peripheral state functions |
YES | NO |
RNG_EX |
* This driver provides firmware functions to manage the following * functionalities of the random number generator (RNG) peripheral: * + Lock configuration functions * + Reset the RNG |
YES | NO |
RTC |
* This driver provides firmware functions to manage the following * functionalities of the real-time clock (RTC) peripheral: * + Initialization/deinitialization functions * + Calendar (time and date) configuration * + Alarms (alarm A and alarm B) configuration * + WakeUp timer configuration * + TimeStamp configuration * + Tampers configuration * + Backup data register configuration * + RTC tamper and timeStamp pins selection * + Interrupts and flags management |
YES | YES |
RTC_EX |
* This driver provides firmware functions to manage the following * functionalities of the real time clock (RTC) extended peripheral: * + RTC time stamp functions * + RTC tamper functions * + RTC wakeup functions * + Extended control functions * + Extended RTC features functions |
YES | YES |
SAI |
* This driver provides firmware functions to manage the following * functionalities of the serial audio interface (SAI) peripheral: * + Initialization/deinitialization functions * + I/O operation functions * + Peripheral control functions * + Peripheral state functions |
YES | NO |
SAI_EX |
* This driver provides firmware functions to manage the following * functionality of the SAI peripheral controller: * + Modify PDM microphone delays. |
YES | NO |
SD |
* This driver provides firmware functions to manage the following * functionalities of the secure digital (SD) peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral control functions * + Peripheral state functions |
YES | NO |
SD_EX |
* This driver provides firmware functions to manage the following * functionalities of the secure digital (SD) peripheral: * + Extended features functions |
YES | NO |
SMARTCARD |
* This driver provides firmware functions to manage the following * functionalities of the smartcard peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral control functions * + Peripheral state and error functions * + Extended features functions |
YES | NO |
SMARTCARD_EX |
* This driver provides extended firmware functions to manage the following * functionalities of the smartCard. * + Initialization and deinitialization functions * + Peripheral control functions |
YES | NO |
SMBUS |
* This driver provides firmware functions to manage the following * functionalities of the system management bus (SMBus) peripheral, * based on I2C principles of operation : * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral state and errors functions |
YES | NO |
SPDIFRX |
* This driver provides firmware functions to manage the following * functionalities of the SPDIFRX audio interface: * + Initialization and configuration * + Data transfers functions * + DMA transfers management * + Interrupts and flags management |
YES | NO |
SPI |
* This driver provides firmware functions to manage the following * functionalities of the serial peripheral interface (SPI) peripheral: * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral control functions * + Peripheral state functions |
YES | YES |
SPI_EX |
* This driver provides firmware functions to manage the following * SPI peripheral extended functionalities : * + I/O operation functions * + Peripheral control functions |
YES | YES |
FMC_SRAM |
* This driver provides a generic firmware to drive SRAM memories * mounted as external device. |
YES | NO |
FMC_NAND |
* This driver provides a generic firmware to drive NAND memories * mounted as external device. |
YES | NO |
TIMER |
* This driver provides firmware functions to manage the following * functionalities of the timer (TIM) peripheral: * + TIM time base initialization * + TIM time base start * + TIM time base start interruption * + TIM time base start DMA * + TIM output compare/PWM initialization * + TIM output compare/PWM channel configuration * + TIM output compare/PWM start * + TIM output compare/PWM start interruption * + TIM output compare/PWM start DMA * + TIM input capture initialization * + TIM input capture channel configuration * + TIM input capture start * + TIM input capture start interruption * + TIM input capture start DMA * + TIM one pulse initialization * + TIM one pulse channel configuration * + TIM one pulse start * + TIM encoder interface initialization * + TIM encoder interface start * + TIM encoder interface start interruption * + TIM encoder interface start DMA * + Commutation event configuration with interruption and DMA * + TIM OCRef clear configuration * + TIM external clock configuration |
YES | YES |
TIMER_EX |
* This driver provides firmware functions to manage the following * functionalities of the timer extended peripheral: * + Time hall sensor interface initialization * + Time hall sensor interface start * + Time complementary signal break and dead time configuration * + Time controller and receiver synchronization configuration * + Time output compare/PWM channel configuration (for channels 5 and 6) * + Timer remapping capabilities configuration |
YES | YES |
UART |
* This driver provides firmware functions to manage the following * functionalities of the universal asynchronous receiver transmitter peripheral (UART). * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral control functions |
YES | YES |
UART_EX |
* This driver provides firmware functions to manage the following extended * functionalities of the universal synchronous receiver transmitter peripheral (USART). * + Peripheral control functions |
YES | YES |
U(S)ART |
* This driver provides firmware functions to manage the following * functionalities of the universal (synchronous) asynchronous receiver transmitter * peripheral (U(S)ART). * + Initialization and deinitialization functions * + I/O operation functions * + Peripheral control functions * + Peripheral state and error functions * + Peripheral control functions |
YES | NO |
4.1.2. LL drivers[edit | edit source]
STM32CubeMP2 LL Driver items | Description | CM33 | CM0+ |
---|---|---|---|
ADC |
* This driver provides firmware functions to manage the following * functionalities of the ADC peripheral: * + Initialization/deinitialization functions * + Configuration functions (ADC instance, group regular, group injected, * channels, analog watchdog, oversampling, multimode) * + IT/FLAGS management functions |
YES | NO |
DELAYBLOCK |
* This file provides firmware functions to manage the following * functionalities of the DelayBlock peripheral: * + input clock frequency * + up to 12 oversampling phases |
YES | NO |
DMA |
* This driver provides firmware functions to manage the following * functionalities of the DMA peripheral: * + Initialization/deinitialization functions * + Configuration functions * + IT/FLAGS management functions |
YES | YES |
EXTI |
* This driver provides firmware functions to manage the following * functionalities of the EXTI peripheral: * + Initialization/deinitialization functions * + IT/FLAGS/Trigger management functions * + Configuration functions |
YES | YES |
FMC |
* This driver provides firmware functions to manage the following * functionalities of the flexible memory controller (FMC) peripheral memories: * + Initialization/deinitialization functions * + Peripheral control functions * + Peripheral state functions |
YES | NO |
GPIO |
* This driver provides firmware functions to manage the following * functionalities of the GPIO peripheral: * + Initialization/de-initialization functions * + Data access functions * + Port configuration functions |
YES | YES |
I2C |
* This driver provides firmware functions to manage the following * functionalities of the I2C peripheral: * + Initialization/deinitialization functions * + IT/FLAGS management functions * +Data management functions * + Configuration functions |
YES | YES |
LPTIM |
* This driver provides firmware functions to manage the following * functionalities of the LPTIM peripheral: * + Initialization/deinitialization functions * + IT/FLAGS management functions * + Configuration (Trigger / Clock / Encoder / LPTIM) functions |
YES | YES |
DMA |
* This driver provides firmware functions to manage the following * functionalities of the Direct Memory Access (DMA) peripheral: * + Channel management functions (Instance, block, buffer, endianess etc) * + SRC/DES operation functions * + Hardware trigger control |
YES | YES |
PWR |
* This driver provides firmware functions to manage the following * functionalities of the PWR peripheral: * + Deinitialization functions |
YES | NO |
RCC |
* This driver provides firmware functions to manage the following * functionalities of the RCC peripheral: * + Clocks management functions (HSE/HSI/CSI/LSE/LSI/MCO/PLL) * + RTC/TIMERS functions * + IT/FLAGS management functions * + Deinitialization functions * + Get system and peripherals clocks frequency functions |
YES | NO |
RTC |
* This driver provides firmware functions to manage the following * functionalities of the RTC peripheral: * + Initialization/deinitialization functions * + TIME/DATE/ALM functions * + Configuration functions |
YES | YES |
SDMMC |
* This driver provides firmware functions to manage the following * functionalities of the SDMMC peripheral: * + Initialization/de-initialization functions * + IT/FLAGS management functions * + Data / DMA management functions * + Configuration functions |
YES | NO |
SPI |
* This driver provides firmware functions to manage the following * functionalities of the SPI peripheral: * + Control and configuration functions |
YES | YES |
TIM |
* This driver provides firmware functions to manage the following * functionalities of the TIM peripheral: * + Initialization/deinitialization functions * + Configuration functions (Time base, capture compare, output and input channel, * timer synchro, break, DMA burst mode ) * + Counter clock selection functions * + Timer input remapping functions * + IT/FLAGS management functions * + DMA management functions * + Event management functions |
YES | NO |
USART |
* This driver provides firmware functions to manage the following * functionalities of the USART peripheral: * + Initialization/deinitialization functions * + Configuration functions (Irda, smartcard, half duplex, * SPI slave, LIN, Driver enable) * + Advanced configurations services functions * + IT/FLAGS management functions * + DMA management functions * + Data management functions * + Execution functions |
YES | NO |
4.1.3. BSP drivers[edit | 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). STM32MP257x-EV1 Evaluation board , STM32MP257x-DK Discovery kit
and unknown board type identifier .
Drivers/BSP/ ├── STM32MP235F-DK │ ├── stm32mp235f_disco_bus.c │ ├── stm32mp235f_disco_bus.h │ ├── stm32mp235f_disco.c │ ├── stm32mp235f_disco_conf_template.h │ ├── stm32mp235f_disco_errno.h │ ├── stm32mp235f_disco.h │ ├── stm32mp235f_disco_pmic.c │ ├── stm32mp235f_disco_pmic.h │ ├── stm32mp235f_disco_usbpd_pwr.c │ └── stm32mp235f_disco_usbpd_pwr.h ├── STM32MP257F-DK │ ├── stm32mp257f_disco_bus.c │ ├── stm32mp257f_disco_bus.h │ ├── stm32mp257f_disco.c │ ├── stm32mp257f_disco_camera.c │ ├── stm32mp257f_disco_camera.h │ ├── stm32mp257f_disco_conf_template.h │ ├── stm32mp257f_disco_errno.h │ ├── stm32mp257f_disco.h │ ├── stm32mp257f_disco_pmic.c │ ├── stm32mp257f_disco_pmic.h │ ├── stm32mp257f_disco_usbpd_pwr.c │ ├── stm32mp257f_disco_usbpd_pwr.h └── STM32MP257F-EV1 ├── stm32mp257f_eval_bus.c ├── stm32mp257f_eval_bus.h ├── stm32mp257f_eval.c ├── stm32mp257f_eval_camera.c ├── stm32mp257f_eval_camera.h ├── stm32mp257f_eval_conf_template.h ├── stm32mp257f_eval_errno.h ├── stm32mp257f_eval.h ├── stm32mp257f_eval_lcd.c ├── stm32mp257f_eval_lcd.h ├── stm32mp257f_eval_pmic.c ├── stm32mp257f_eval_pmic.h ├── stm32mp257f_eval_usbpd_pwr.c └── stm32mp257f_eval_usbpd_pwr.h
BSP Components are external components which can be attached toSTM32MP257x-EV1 Evaluation board and STM32MP257x-DK Discovery kit
.
STM32CubeMP2 BSP Component Items | Description |
---|---|
Common |
This directory contains the BSP common components drivers. |
STPMIC2 |
This driver provides a set of functions needed to drive STPMIC2 PMU module. |
TCPP0203 |
This driver provides a set of functions needed to drive TCPP02/03 (TCPP: Type-C port protection is a companion chip to safely comply with USB-type C specification for power delivery). |
4.2. Middlewares[edit | edit source]
The Middlewares folder contains all available STM32Cube Middlewares including:
![]() |
Note:
|
4.3. Projects[edit | edit source]
The "Projects" folder contains all STM32Cube examples that are classified in 3 ways as described below :
- Examples: It uses only the HAL drivers without any middleware component. They are available in directory Projects/<board_name>/Examples.
- Applications: It provides typical use cases of each middleware component. They are available in directory Projects/<board_name>/Applications.
- Demonstrations: This program demonstrates the USBPD stack. Directory Projects/<board_name>/Demonstrations.
The list of projects is available here.Projects/STM32CubeProjectsList.html
4.3.1. Examples, applications, and demonstrations[edit | edit source]
4.3.1.1. Applications, Examples, Demonstrations for STM32MP257F-EV1[edit | edit source]
Projects/STM32MP257F-EV1/ ├── Applications │ ├── FreeRTOS │ │ ├── FreeRTOS_MsgQueue │ │ ├── FreeRTOS_Semaphore │ │ └── FreeRTOS_ThreadCreation │ ├── OpenAMP │ │ └── OpenAMP_TTY_echo │ ├── TFM │ │ └── TFM_Protected_Storage │ └── USBPD │ └── USBPD_DRP_UCSI ├── Demonstrations │ ├── CM0PLUS_DEMO │ ├── LowPower_SRAM_Demo │ └── USBPD_DRP_UCSI ├── Examples │ ├── ADC │ │ ├── ADC_DifferentialMode │ │ ├── ADC_InternalChannelConversion │ │ ├── ADC_OverSampler │ │ └── ADC_RegularConversion_Polling │ ├── CORTEX │ │ └── CORTEXM_ModePrivilege │ ├── CRC │ │ ├── CRC_Bytes_Stream_7bit_CRC │ │ └── CRC_UserDefinedPolynomial │ ├── CRYP │ │ ├── CRYP_AES_DMA │ │ └── CRYP_AESGCM │ ├── DMA │ │ ├── DMA_LinkedList │ │ └── DMA_RepeatedBlock │ ├── FDCAN │ │ ├── FDCAN_Classic_Frame_Networking │ │ ├── FDCAN_Com_IT │ │ └── FDCAN_Loopback │ ├── GPIO │ │ └── GPIO_EXTI │ ├── I2C │ │ ├── I2C_TwoBoards_ComDMA │ │ └── I2C_TwoBoards_ComPolling │ ├── I3C │ │ ├── I3C_Controller_I2C_ComDMA │ │ └── I3C_Target_I2C_ComDMA │ ├── LPTIM │ │ └── LPTIM_PulseCounter │ ├── LTDC │ │ └── LTDC_Display_3rdLayer │ ├── SPI │ │ └── SPI_FullDuplex_ComDMA │ └── TIM │ ├── TIM_DMABurst │ ├── TIM_OnePulse │ ├── TIM_PWMOutput │ └── TIM_TimeBase ├── Examples_LL │ ├── EXTI │ │ └── EXTI_ToggleLedOnIT_Init │ ├── TIM │ │ └── TIM_PWMOutput │ └── USART │ └── USART_Communication_Rx_IT ├── Templates │ └── Template_CM33_NonSecure └── Templates_LL └── Template_LL_CM33_NonSecure
4.3.1.2. Applications, Examples, Demonstrations for STM32MP257F-DK[edit | edit source]
Projects/STM32MP257F-DK/ ├── Applications │ ├── FreeRTOS │ │ ├── FreeRTOS_ThreadCreation │ │ └── FreeRTOS_Timers │ ├── OpenAMP │ │ └── OpenAMP_TTY_echo │ └── USBPD │ └── USBPD_DRP_UCSI ├── Demonstrations │ └── USBPD_DRP_UCSI ├── Examples │ ├── CORTEX │ │ └── CORTEXM_ModePrivilege │ ├── CRC │ │ └── CRC_Bytes_Stream_7bit_CRC │ ├── CRYP │ │ └── CRYP_AESCCM_IT │ ├── DMA │ │ ├── DMA_LinkedList │ │ └── DMA_RepeatedBlock │ ├── GPIO │ │ └── GPIO_EXTI │ ├── I2C │ │ └── I2C_TwoBoards_ComIT │ ├── I3C │ │ ├── I3C_Controller_InBandInterrupt_IT │ │ └── I3C_Target_InBandInterrupt_IT │ ├── LPTIM │ │ └── LPTIM_PulseCounter │ └── TIM │ └── TIM_InputCapture ├── Examples_LL │ └── USART │ └── USART_Communication_Rx_IT └── Templates └── Template_CM33_NonSecure
4.3.1.3. Applications, Examples, Demonstrations for STM32MP235F-DK[edit | edit source]
Projects/STM32MP235F-DK/ ├── Applications │ ├── FreeRTOS │ │ ├── FreeRTOS_ThreadCreation │ │ └── FreeRTOS_Timers │ └── USBPD │ └── USBPD_DRP_UCSI ├── Demonstrations │ └── USBPD_DRP_UCSI ├── Examples │ ├── CORTEX │ │ └── CORTEXM_ModePrivilege │ ├── CRC │ │ └── CRC_Bytes_Stream_7bit_CRC │ ├── CRYP │ │ └── CRYP_AESCCM_IT │ ├── DMA │ │ ├── DMA_LinkedList │ │ └── DMA_RepeatedBlock │ ├── GPIO │ │ └── GPIO_EXTI │ ├── I2C │ │ └── I2C_TwoBoards_ComIT │ ├── I3C │ │ └── I3C_Controller_InBandInterrupt_IT │ ├── LPTIM │ │ └── LPTIM_PulseCounter │ └── TIM │ └── TIM_InputCapture ├── Examples_LL │ └── USART │ └── USART_Communication_Rx_IT └── Templates └── Template_CM33_NonSecure
4.3.1.4. Brief description of all applications/examples part of the package[edit | edit source]
Type | Module Name | Project Name | Description | STM32MP257F-EV1 ![]() |
STM32MP257F-DK ![]() |
STM32MP257F-DK ![]() ![]() |
Mode | Core |
---|---|---|---|---|---|---|---|---|
Demonstrations | USBPD | USBPD_DRP_UCSI | Demonstrate usage of STM32MP25xx Cortex-M33 as a UCSI (USB Type-CTM Connector System Software Interface) Platform Policy Manager(PPM). The PPM is a combination of hardware and firmware that manages the USB Type-C connectors on the platform. The Cortex-A35 has a role of UCSI OS Policy Manager to interface with the PPM, via OpenAMP-rpmsg Virtual I2C with the UCSI interface. | x | x | x | Production | Arm® Cortex®-M33 |
CM0 | CM0PLUS Demo | Shows usage of Cortex-M0 exercising the LPUART (part of SmartRun Domain) while interacting with Cortex A35 through IPCC. | x | - | - | Production | Arm® Cortex®-M0+ | |
LowPower | LowPowerSRAM_Demo | A demonstration showing transition of CPU subsystems and power domains into low power states. | x | - | - | Production | Arm® Cortex®-M33 | |
Templates | CM33 NS | Template_CM33_NonSecure | A template example that use HAL drivers which you can build upon to create your own examples. | x | x | x | Production | Arm® Cortex®-M33 |
Templates_LL | CM33 NS | Template_LL_CM33_NonSecure | A template example that use LL drivers which you can build upon to create your own examples. | x | x | x | Production | Arm® Cortex®-M33 |
Applications | FreeRTOS | FreeRTOS_MsgQueue | Demonstrate MsgQueue API | x | - | - | Production | Arm® Cortex®-M33 |
FreeRTOS_ThreadCreation | How to implement thread creation using CMSIS RTOS API. | x | x | x | Production | Arm® Cortex®-M33 | ||
FreeRTOS_Semaphore | How to use semaphores with CMSIS RTOS API | x | - | - | Production | Arm® Cortex®-M33 | ||
FreeRTOS_Timers | How to use timers of CMSIS RTOS API. | - | x | x | Production | Arm® Cortex®-M33 | ||
USBPD | USBPD_DRP_UCSI | Demonstrate usage of STM32MP25xx Cortex-M33 as a UCSI (USB Type-CTM Connector System Software Interface) Platform Policy Manager(PPM). The PPM is a combination of hardware and firmware that manages the USB Type-C connectors on the platform. The Cortex-A35 has a role of UCSI OS Policy Manager to interface with the PPM, via OpenAMP-rpmsg Virtual I2C with the UCSI interface. | x | x | x | Production | Arm® Cortex®-M33 | |
TFM | TFM_Protected_Storage | It demonstrates an example of Protected Storage API (PSA) usage provided by the trusted firmware (TFM) middleware. | x | - | - | Production | Arm® Cortex®-M33 | |
OpenAMP | OpenAMP_TTY_echo | It demonstrates How to use OpenAMP MW + Virtual UART to create an Inter-Processor Communication channel seen as TTY device in Linux OS. | x | x | - | Production | Arm® Cortex®-M33 | |
Examples_LL | USART | USART_Communication_Rx_IT | Use of a timer peripheral to generate a PWM output signal and update the PWM duty cycle. This example is based on the STM32MP2xx TIM LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | x | x | x | Production | Arm® Cortex®-M33 |
EXTI | EXTI_ToggleLedOnIT_Init | How to configure the EXTI and use GPIOs to toggle the user LEDs available on the board when a user button is pressed. This example is based on the STM32MP2xx LL API. The peripheral initialization uses LL initialization functions to demonstrate LL init usage. | x | x | x | Production | Arm® Cortex®-M33 | |
TIM | TIM_PWMOutput | Use of a timer peripheral to generate a PWM output signal and update the PWM duty cycle. This example is based on the STM32MP2xx TIM LL API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). | x | x | x | Production | Arm® Cortex®-M33 | |
Examples | I3C | I3C_Controller_I2C_ComDMA | How to handle I2C communication as I3C Controller data buffer transmission/reception between two boards, using DMA. | x | - | - | Production | Arm® Cortex®-M33 |
I3C_Target_I2C_ComDMA | Handle I2C data buffer transmission/reception between two boards, using DMA. | x | - | - | Production | Arm® Cortex®-M33 | ||
I3C_Controller_InBandInterrupt_IT | How to handle an In-Band-Interrupt event between an I3C Controller and I3C Targets | - | x | x | Production | Arm® Cortex®-M33 | ||
I3C_Target_InBandInterrupt_IT | How to handle I2C communication as I3C Controller data buffer transmission/reception between two boards, using DMA. | - | x | - | Production | Arm® Cortex®-M33 | ||
SPI | SPI_FullDuplex_ComDMA | This example shows how to perform SPI data buffer transmission/reception between two boards via DMA. | x | x | x | Production | Arm® Cortex®-M33 | |
LPTIM | LPTIM_PulseCounter | This example describes how to configure and use LPTIM to count pulses through the LPTIM HAL API. | x | x | x | Production | Arm® Cortex®-M33 | |
CORTEXM | CORTEXM_ModePrivilege | How to modify the Thread mode privilege access and stack. Thread mode is entered on reset or when returning from an exception. | x | x | x | Production | Arm® Cortex®-M33 | |
GPIO | GPIO_EXTI | How to configure external interrupt lines. | x | x | x | Production | Arm® Cortex®-M33 | |
I2C | I2C_TwoBoards_ComDMA | How to handle I2C data buffer transmission/reception between two boards, via DMA. | x | - | - | Production | Arm® Cortex®-M33 | |
I2C_TwoBoards_ComPolling | How to handle I2C data buffer transmission/reception between two boards, via Polling. | x | - | - | Production | Arm® Cortex®-M33 | ||
I2C_TwoBoards_ComIT | I2C data buffer transmission/reception between two boards, via Interrupt. | - | x | x | Production | Arm® Cortex®-M33 | ||
CRC | CRC_Bytes_Stream_7bit_CRC | Configure and use CRC HAL API to calculate 7 bit CRC | x | x | x | Production | Arm® Cortex®-M33 | |
CRC_UserDefinedPolynomial | Compute CRC on a buffer using a User defined polynomial | x | Production | Arm® Cortex®-M33 | ||||
CRYP | CRYP_AESGCM | How to use the CRYPTO peripheral to encrypt/decrypt data(Plaintext/Ciphertext) using AES Galois/counter mode (GCM)and generate the authentication TAG. | x | - | - | Production | Arm® Cortex®-M33 | |
CRYP_AES_DMA | This example provides a short description of how to use the CRYPTO peripheral to encrypt and decrypt data using AES-128 Algorithm with ECB chaining mode | x | - | - | Production | Arm® Cortex®-M33 | ||
CRYP_AESCCM_IT | How to use the CRYPTO peripheral to encrypt/decrypt data(Plaintext/Ciphertext) using cipher block chaining-message authentication code (CCM) mode (CCM) | - | x | x | Production | Arm® Cortex®-M33 | ||
DMA | DMA_LinkedList | How to use the DMA to perform a list of transfers. The transfer list is organized as linked-list, each time the current transfer ends the DMA automatically reload the next transfer parameters, and starts it (without CPU intervention). | x | x | x | Production | Arm® Cortex®-M33 | |
DMA_RepeatedBlock | This example describes how to configure and use the DMA HAL API to perform repeated block transactions. | x | x | x | Production | Arm® Cortex®-M33 | ||
FDCAN | FDCAN_Classic_Frame_Networking | Configure the FDCAN peripheral to send and receive Classic CAN frames in normal mode. | x | - | - | Production | Arm® Cortex®-M33 | |
FDCAN_Com_IT | Demonstrate Interrupt Process Communication between two FDCAN units | x | - | - | Production | Arm® Cortex®-M33 | ||
FDCAN_Loopback | Configure the FDCAN to operate in loopback mode. | x | - | - | Production | Arm® Cortex®-M33 | ||
ADC | ADC_DifferentialMode | configure and use the ADC to convert an external analog input in Differential Mode, difference between external voltage on VinN and VinP. | x | - | - | Production | Arm® Cortex®-M33 | |
ADC_InternalChannelConversion | Configure and use the ADC to retrieve an internal ADC channel. | x | - | - | Production | Arm® Cortex®-M33 | ||
ADC_OverSampler | Configure and use the ADC to convert an external analog input combined with oversampling feature to increase resolution through the HAL API. | x | - | - | Production | Arm® Cortex®-M33 | ||
ADC_RegularConversion_Polling | Use the ADC in Polling mode to convert data through the HAL API. | x | - | - | Production | Arm® Cortex®-M33 | ||
LTDC | LTDC_Display_3rdLayer | This example demonstrates CM33 controlled 3rd Layer non-protected while displaying standard HMI on linux side. | x | - | - | Production | Arm® Cortex®-M33 | |
TIM | TIM_DMABurst | This example shows how to update the TIMER TIM8_CH4 period and the duty cycle using the TIMER DMA burst feature. | x | - | - | Production | Arm® Cortex®-M33 | |
TIM_OnePulse | This example shows how to use the TIMER peripheral to generate a single pulse when a rising edge of an external signal is received on the TIMER Input pin. | x | - | - | Production | Arm® Cortex®-M33 | ||
TIM_PWMOutput | This example shows how to configure the TIM peripheral in PWM (Pulse Width Modulation) mode. | x | x | x | Production | Arm® Cortex®-M33 | ||
TIM_TimeBase | This example shows how to configure the TIM peripheral to generate a time base of one second with the corresponding Interrupt request. | x | x | - | Production | Arm® Cortex®-M33 | ||
TIM_InputCapture | Use the TIM peripheral to measure the frequency of an external signal. | - | x | x | Production | Arm® Cortex®-M33 |
4.3.2. Signing the STM32CubeMP2 firmware[edit | edit source]
All the above projects are signed by default during the build process using a key provided in the Utilities. Only the demonstration projects are not signed. You could however sign any project using your own keys using a method described here, to sign your STM32CubeMP2 firmware binaries.
5. Get started with STM32CubeMP2 Package[edit | edit source]
To know how to get it, read STM32CubeMP2 Package - Getting Started article.