Registered User mNo edit summary |
Registered User Tag: 2017 source edit |
||
(27 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{ApplicableFor | <noinclude>{{ApplicableFor | ||
|MPUs list=STM32MP25x | |MPUs list=STM32MP25x | ||
|MPUs checklist=STM32MP25x | |MPUs checklist=STM32MP13x,STM32MP15x, STM32MP25x | ||
}} | }} | ||
</noinclude> | </noinclude> | ||
[[File:STM32Cube Package.png |center|=link|200px]] | [[File:STM32Cube Package.png |center|=link|200px]] | ||
This article introduces the structure and the content of the '''STM32CubeMP2 | This article introduces the structure and the content of the '''STM32CubeMP2 package''', the embedded software part of STM32Cube™, running on the '''Arm<sup>®</sup> Cortex<sup>®</sup>-M33 coprocessor'''. It references also other interesting wiki articles to better understand and use the STM32CubeMP2 package. | ||
==What is the STM32CubeMP2 | ==What is the STM32CubeMP2 package== | ||
STM32CubeMP2 Package, running on the '''Arm<sup>®</sup> Cortex<sup>®</sup>-M33 processor''', consists of: | STM32CubeMP2 Package, running on the '''Arm<sup>®</sup> Cortex<sup>®</sup>-M33 processor''', consists of: | ||
* '''The hardware abstraction layer''' (HAL), enabling portability between different STM32 devices via standardized API calls | * '''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 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 | * '''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 | * '''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 | * '''A collection of examples''', running on an MPU board and allowing demonstration of a basic implementation of features from a set of IPs | ||
'''STM32CubeMP2 | '''STM32CubeMP2 package''' uses components such as '''OpenAMP''' and '''ResourceManager''' that allow easy communication and resource sharing between main processors running with Linux on '''Arm<sup>®</sup> Cortex<sup>®</sup>-A35''', and MCU coprocessors running on '''Arm<sup>®</sup> Cortex<sup>®</sup>-M33'''. | ||
:*'''[https://www.multicore-association.org/workgroup/oamp.php 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. | :*'''[https://www.multicore-association.org/workgroup/oamp.php 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. | ||
Line 22: | Line 21: | ||
{{info| '''Note:''' | {{info| '''Note:''' | ||
*Refer to [[Coprocessor management overview]] for further information related to coprocessor management}} | *Refer to [[Coprocessor management overview]] for further information related to coprocessor management.}} | ||
==Software architecture overview== | ==Software architecture overview== | ||
Line 28: | Line 27: | ||
==STM32CubeMP2 Package structure == | ==STM32CubeMP2 Package structure == | ||
This chapter describes the structure of the STM32CubeMP2 Package (drivers, middleware components | This chapter describes the structure of the STM32CubeMP2 Package (drivers, middleware components, etc.). | ||
'''STM32CubeMP2 Package''' offers a highly portable ''' | '''STM32CubeMP2 Package''' offers a highly portable '''hardware abstraction layer''' (HAL), built around a generic and modular architecture. | ||
This HAL allows the upper layers, middleware and application, to implement functions whenever '''STM32MP25''' device is used. This improves the library code | This HAL allows the upper layers, which are middleware and application, to implement functions whenever '''STM32MP25''' 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 ''' | '''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. | The '''STM32CubeMP2 Package''' is provided with the structure shown below. | ||
Line 39: | Line 38: | ||
[[File: STM32MP25_Package_Structure.png|850px|link=]] | [[File: STM32MP25_Package_Structure.png|850px|link=]] | ||
{{UpdateNeededForNewBoard|New board to be added in picture}} | {{UpdateNeededForNewBoard|New board to be added in picture}} | ||
==STM32CubeMP2 Package content== | ==STM32CubeMP2 Package content== | ||
This chapter describes the content of the STM32CubeMP2 Package (drivers, middleware components | This chapter describes the content of the STM32CubeMP2 Package (drivers, middleware components, etc.). | ||
===Drivers=== | ===Drivers=== | ||
The '''Drivers''' folder contains all the '''STM32Cube Drivers''', including BSP and HAL drivers. | The '''Drivers''' folder contains all the '''STM32Cube Drivers''', including BSP and HAL drivers. | ||
{{ | |||
The STM32CubeMP25 Package provides all driver user manuals: | |||
* The BSP user manual for {{Board | type=257x-EV1}} is available in '''{{CodeSource | STM32CubeMP2 | Drivers/BSP/STM32MP257F-EV1/STM32MP257F-EV1_BSP_User_Manual.chm}}''' | |||
* The BSP user manual for {{Board | type=257x-DK}} is available in '''{{CodeSource | STM32CubeMP2 | Drivers/BSP/STM32MP257F-DK/STM32MP257F-DK_BSP_User_Manual.chm}}''' | |||
* The HAL user manual is available in '''{{CodeSource | STM32CubeMP2 | Drivers/STM32MP2xx_HAL_Driver/STM32MP257Cxx_CM33_User_Manual.chm}}''' | |||
The following chapters give the list of available BSP, HAL, and LL drivers. | |||
====HAL drivers==== | ====HAL drivers==== | ||
{| class="st-table" | {| class="st-table" | ||
Line 55: | Line 62: | ||
| ADC || | | ADC || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the analog to digital convertor (ADC) | ||
* peripheral: | * peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* ++ Initialization and | * ++ Initialization and configuration of ADC | ||
* + Operation functions | * + Operation functions | ||
* ++ Start, stop, get result of conversions of regular | * ++ Start, stop, get result of conversions of regular | ||
Line 64: | Line 71: | ||
* + Control functions | * + Control functions | ||
* ++ Channels configuration on regular group | * ++ Channels configuration on regular group | ||
* ++ Analog | * ++ Analog watchdog configuration | ||
* + State functions | * + State functions | ||
* ++ ADC state machine management | * ++ ADC state machine management | ||
Line 71: | Line 78: | ||
| ADC_EX || | | ADC_EX || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* extended functionalities of the | * extended functionalities of the analog to digital convertor (ADC) | ||
* peripheral: | * peripheral: | ||
* + Operation functions | * + Operation functions | ||
Line 87: | Line 94: | ||
| BSEC || | | BSEC || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the boot and security and OTP control(BSEC) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral state functions | ||
|- | |- | ||
| CRC || | | CRC || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the cyclic redundancy check (CRC) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral state functions | ||
* + Extended features functions | * + Extended features functions | ||
|- | |- | ||
| CRYP || | | CRYP || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the cryptography (CRYP) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + AES processing functions | * + AES processing functions | ||
* + DES processing functions | * + DES processing functions | ||
Line 109: | Line 116: | ||
* + DMA callback functions | * + DMA callback functions | ||
* + CRYP IRQ handler management | * + CRYP IRQ handler management | ||
* + Peripheral | * + Peripheral state functions | ||
|- | |- | ||
| CRYP_EX || | | CRYP_EX || | ||
Line 118: | Line 125: | ||
| CSI || | | CSI || | ||
* This file provides firmware functions to manage the following | * This file provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the digital camera interface (CSI) peripheral: | ||
* + Initialization and de-initialization functions | * + Initialization and de-initialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral state and error functions | ||
|- | |- | ||
| DCACHE || | | DCACHE || | ||
* This file provides firmware functions to manage the following | * This file provides firmware functions to manage the following | ||
* functionalities of the DCACHE. | * functionalities of the DCACHE. | ||
* + Initialization and | * + Initialization and configuration | ||
* + Cache coherency command | * + Cache coherency command | ||
* + Monitoring management | * + Monitoring management | ||
Line 133: | Line 140: | ||
| DCMI || | | DCMI || | ||
* This file provides firmware functions to manage the following | * This file provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the digital camera interface (DCMI) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral state and error functions | ||
|- | |- | ||
| DCMIPP || | | DCMIPP || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the DCMIPP ( | * functionalities of the DCMIPP (digital camera interface pixel pipeline) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral state and error functions | ||
|- | |- | ||
| DDR || | | DDR || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the double data rate synchronous dynamic random | ||
* | * access memory (DDR-SDRAM) peripheral, through its controller | ||
* (DDRCTRL) and its physical interface controller (DDRPHYC). | * (DDRCTRL) and its physical interface controller (DDRPHYC). | ||
|- | |- | ||
| DMA || | | DMA || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the direct memory access (DMA) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral state and errors functions | ||
|- | |- | ||
| DMA_EX || | | DMA_EX || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the DMA | * functionalities of the DMA extension peripheral: | ||
* + Extended features functions | * + Extended features functions | ||
|- | |- | ||
Line 168: | Line 175: | ||
* This file provides firmware functions to manage the following | * This file provides firmware functions to manage the following | ||
* functionalities of the DSI peripheral: | * functionalities of the DSI peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral state and errors functions | ||
|- | |- | ||
| ETH || | | ETH || | ||
Line 177: | Line 184: | ||
* functionalities of the Ethernet (ETH) peripheral: | * functionalities of the Ethernet (ETH) peripheral: | ||
* + Initialization and deinitialization functions | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral state and errors functions | ||
|- | |- | ||
| EXTI || | | EXTI || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the general purpose input/output (EXTI) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
|- | |- | ||
| FDCAN || | | FDCAN || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the flexible datarate controller area network | ||
* (FDCAN) peripheral: | * (FDCAN) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral configuration and control functions | ||
* + Peripheral | * + Peripheral state and error functions | ||
|- | |- | ||
| GPIO || | | GPIO || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the general purpose input/output (GPIO) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Extended | * + Extended peripheral control functions | ||
|- | |- | ||
| HAL || | | HAL || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of HAL, Tick, SYSCFG, DBGMCU: | * functionalities of HAL, Tick, SYSCFG, DBGMCU: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + HAL | * + HAL initialization and deinitialization functions | ||
* + Configure the source of the time base | * + Configure the source of the time base | ||
* + HAL | * + HAL control functions | ||
* + Tick management (get/set/inc/priority/suspend/resume) | * + Tick management (get/set/inc/priority/suspend/resume) | ||
* + Get HAL revision, the device revision identifier, the device identifier | * + Get HAL revision, the device revision identifier, the device identifier | ||
* + Enable/ | * + Enable/disable DBG wake up on AIEC | ||
* + Enable/ | * + Enable/disable the debug module during Domain1 SLEEP mode | ||
* + Enable/Disable the | * + Enable/Disable the debug module during Domain1 STOP mode | ||
* + Enable/Disable the | * + Enable/Disable the debug module during Domain1 STANDBY mode | ||
* + Configure the internal voltage reference buffer voltage scale | * + Configure the internal voltage reference buffer voltage scale | ||
* + Configure the internal voltage reference buffer high impedance mode | * + Configure the internal voltage reference buffer high impedance mode | ||
* + Tune the | * + Tune the internal voltage reference buffer (VREFBUF) | ||
* + Enable/ | * + Enable/disable the internal voltage reference buffer (VREFBUF) | ||
* + Ethernet PHY | * + Ethernet PHY interface selection either MII or RMII | ||
* + Analog | * + Analog switch control for dual analog pads | ||
* + Enable/ | * + Enable/disable the booster to reduce the total harmonic distortion of the analog | ||
* + Enable/ | * + Enable/power-down the I/O compensation cell | ||
* + To Enable/ | * + To Enable/disable optimize the I/O speed when the product voltage is low | ||
* + Code selection for the I/O | * + Code selection for the I/O compensation cell | ||
|- | |- | ||
| HASH || | | HASH || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the HASH peripheral: | * functionalities of the HASH peripheral: | ||
* + Initialization and | * + Initialization and deinitialization methods | ||
* + HASH or HMAC processing in polling mode | * + HASH or HMAC processing in polling mode | ||
* + HASH or HMAC processing in interrupt mode | * + HASH or HMAC processing in interrupt mode | ||
* + HASH or HMAC processing in DMA mode | * + HASH or HMAC processing in DMA mode | ||
* + Peripheral | * + Peripheral state methods | ||
* + HASH or HMAC processing suspension/resumption | * + HASH or HMAC processing suspension/resumption | ||
|- | |- | ||
Line 245: | Line 252: | ||
* + HASH or HMAC processing in DMA mode | * + HASH or HMAC processing in DMA mode | ||
* Additionally, this file provides functions to manage HMAC | * Additionally, this file provides functions to manage HMAC | ||
* | * multibuffer DMA-based processing for MD-5, SHA-1, SHA-224 | ||
* and SHA-256. | * and SHA-256. | ||
|- | |- | ||
Line 251: | Line 258: | ||
* This file provides firmware functions to manage the following | * This file provides firmware functions to manage the following | ||
* functionalities of the semaphore peripheral: | * functionalities of the semaphore peripheral: | ||
* + Semaphore | * + Semaphore take function (2-Step procedure) , non blocking | ||
* + Semaphore | * + Semaphore fastTake function (1-Step procedure) , non blocking | ||
* + Semaphore | * + Semaphore status check | ||
* + Semaphore | * + Semaphore clear key set and get | ||
* + Release and release all functions | * + Release and release all functions | ||
* + Semaphore notification enabling and disabling and callback functions | * + Semaphore notification enabling and disabling and callback functions | ||
Line 261: | Line 268: | ||
| ICACHE || | | ICACHE || | ||
* This file provides firmware functions to manage the following | * This file provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the instruction cache (ICACHE). | ||
* + Initialization and | * + Initialization and configuration | ||
* + Invalidate functions | * + Invalidate functions | ||
* + Monitoring management | * + Monitoring management | ||
Line 269: | Line 276: | ||
| IPCC || | | IPCC || | ||
* This file provides firmware functions to manage the following | * This file provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the inter-processor communication controller | ||
* peripherals (IPCC). | * peripherals (IPCC). | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + Configuration, notification and interrupts handling | * + Configuration, notification, and interrupts handling | ||
* + Peripheral | * + Peripheral state and error functions | ||
|- | |- | ||
| I<sup>2</sup>C || | | I<sup>2</sup>C || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the inter integrated circuit (I2C) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral state and errors functions | ||
|- | |- | ||
| I<sup>2</sup>C_EX || | | I<sup>2</sup>C_EX || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of I2C | * functionalities of I2C extended peripheral: | ||
* + Filter | * + Filter mode functions | ||
* + WakeUp | * + WakeUp mode functions | ||
* + FastModePlus | * + FastModePlus functions | ||
|- | |- | ||
| I<sup>2</sup>S || | | I<sup>2</sup>S || | ||
* This file provides firmware functions to manage the following | * This file provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the integrated interchip sound (I2S) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral state and errors functions | ||
|- | |- | ||
| I<sup>3</sup>C || | | I<sup>3</sup>C || | ||
* This file provides firmware functions to manage the following | * This file provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the improvement inter integrated circuit (I3C) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral state and errors functions | ||
|- | |- | ||
| IWDG || | | IWDG || | ||
* This file provides firmware functions to manage the following | * This file provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the independent watchdog (IWDG) peripheral: | ||
* + Initialization and | * + Initialization and start functions | ||
* + | * + I/O operation functions | ||
|- | |- | ||
| LPTIM || | | LPTIM || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the low power timer (LPTIM) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions. | ||
* + Start/Stop operation functions in polling mode. | * + Start/Stop operation functions in polling mode. | ||
* + Start/Stop operation functions in interrupt mode. | * + Start/Stop operation functions in interrupt mode. | ||
* + Reading operation functions. | * + Reading operation functions. | ||
* + Peripheral | * + Peripheral state functions. | ||
|- | |- | ||
| LTDC || | | LTDC || | ||
* This file provides firmware functions to manage the following | * This file provides firmware functions to manage the following | ||
* functionalities of the LTDC peripheral: | * functionalities of the LTDC peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral state and errors functions | ||
|- | |- | ||
| MMC || | | MMC || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the secure digital (MMC) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + MMC card | * + MMC card control functions | ||
|- | |- | ||
| MMC_EX || | | MMC_EX || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the secure digital (MMC) peripheral: | ||
* + Extended features functions | * + Extended features functions | ||
|- | |- | ||
| PKA || | | PKA || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of public key accelerator(PKA): | * functionalities of public key accelerator (PKA): | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + Start an operation | * + Start an operation | ||
* + Retrieve the operation result | * + Retrieve the operation result | ||
Line 348: | Line 355: | ||
| PSSI || | | PSSI || | ||
* This file provides firmware functions to manage the following | * This file provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the parallel synchronous slave interface (PSSI) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral state and errors functions | ||
|- | |- | ||
| PWR || | | PWR || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the power controller (PWR) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral extended features functions | ||
|- | |- | ||
| PWR_EX || | | PWR_EX || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of PWR extension peripheral: | * functionalities of PWR extension peripheral: | ||
* + Peripheral | * + Peripheral extended features functions | ||
|- | |- | ||
| OSPI || | | OSPI || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the OSPI interface (OSPI). | * functionalities of the OSPI interface (OSPI). | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + Indirect functional mode management | * + Indirect functional mode management | ||
* + Memory-mapped functional mode management | * + Memory-mapped functional mode management | ||
* + Auto-polling functional mode management | * + Auto-polling functional mode management | ||
* + | * + Interrupt and flag management | ||
* + HPDMA channel configuration for indirect functional mode | * + HPDMA channel configuration for indirect functional mode | ||
* + | * + Error management and abort functionality | ||
|- | |- | ||
| RAMCFG || | | RAMCFG || | ||
* This file provides firmware functions to manage the following | * This file provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the RAM configuration controller peripheral: | ||
* + RAMCFG | * + RAMCFG initialization and deinitialization functions. | ||
* + RAMCFG ECC | * + RAMCFG ECC operation functions. | ||
* + RAMCFG CRC | * + RAMCFG CRC operation functions. | ||
* + RAMCFG | * + RAMCFG configure wait state functions. | ||
* + RAMCFG | * + RAMCFG write protection functions. | ||
* + RAMCFG | * + RAMCFG erase operation functions. | ||
* + RAMCFG | * + RAMCFG handle interrupt and callbacks functions. | ||
* + RAMCFG | * + RAMCFG state and error functions. | ||
|- | |- | ||
| RCC || | | RCC || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the reset and clock control (RCC) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Extended | * + Extended peripheral control functions | ||
|- | |- | ||
| RCC_EX || | | RCC_EX || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities RCC extension peripheral: | * functionalities RCC extension peripheral: | ||
* + Extended | * + Extended peripheral control functions | ||
|- | |- | ||
| RIF || | | RIF || | ||
* This file provides firmware functions to manage the following | * This file provides firmware functions to manage the following | ||
* functionalities of RIF: | * functionalities of RIF: | ||
* + RISC | * + RISC initialization and configuration functions | ||
* + IAC | * + IAC initialization and configuration functions | ||
|- | |- | ||
| RNG || | | RNG || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the random number generator (RNG) peripheral: | ||
* + Initialization and configuration functions | * + Initialization and configuration functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral state functions | ||
|- | |- | ||
| RNG_EX || | | RNG_EX || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the random number generator (RNG) peripheral: | ||
* + Lock configuration functions | * + Lock configuration functions | ||
* + Reset the RNG | * + Reset the RNG | ||
Line 421: | Line 428: | ||
| RTC || | | RTC || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the real-time clock (RTC) peripheral: | ||
* + Initialization/ | * + Initialization/deinitialization functions | ||
* + Calendar ( | * + Calendar (time and date) configuration | ||
* + Alarms ( | * + Alarms (alarm A and alarm B) configuration | ||
* + WakeUp | * + WakeUp timer configuration | ||
* + TimeStamp configuration | * + TimeStamp configuration | ||
* + Tampers configuration | * + Tampers configuration | ||
* + Backup | * + Backup data register configuration | ||
* + RTC | * + RTC tamper and timeStamp pins selection | ||
* + Interrupts and flags management | * + Interrupts and flags management | ||
|- | |- | ||
| RTC_EX || | | RTC_EX || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the real time clock (RTC) extended peripheral: | ||
* + RTC | * + RTC time stamp functions | ||
* + RTC | * + RTC tamper functions | ||
* + RTC | * + RTC wakeup functions | ||
* + Extended | * + Extended control functions | ||
* + Extended RTC features functions | * + Extended RTC features functions | ||
|- | |- | ||
| SAI || | | SAI || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the serial audio interface (SAI) peripheral: | ||
* + Initialization/ | * + Initialization/deinitialization functions | ||
* + I/O operation functions | * + I/O operation functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral state functions | ||
|- | |- | ||
| SAI_EX || | | SAI_EX || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionality of the SAI | * functionality of the SAI peripheral controller: | ||
* + Modify PDM microphone delays. | * + Modify PDM microphone delays. | ||
|- | |- | ||
| SD || | | SD || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the secure digital (SD) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral state functions | ||
|- | |- | ||
| SD_EX || | | SD_EX || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the secure digital (SD) peripheral: | ||
* + Extended features functions | * + Extended features functions | ||
|- | |- | ||
| SMARTCARD || | | SMARTCARD || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the smartcard peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral state and error functions | ||
* + Extended features functions | * + Extended features functions | ||
|- | |- | ||
| SMARTCARD_EX || | | SMARTCARD_EX || | ||
* This driver provides extended firmware functions to manage the following | * This driver provides extended firmware functions to manage the following | ||
* functionalities of the | * functionalities of the smartCard. | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + Peripheral | * + Peripheral control functions | ||
|- | |- | ||
| SMBUS || | | SMBUS || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the system management bus (SMBus) peripheral, | ||
* based on I<sup>2</sup>C principles of operation : | * based on I<sup>2</sup>C principles of operation : | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral state and errors functions | ||
|- | |- | ||
| SPDIFRX || | | SPDIFRX || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the SPDIFRX audio interface: | * functionalities of the SPDIFRX audio interface: | ||
* + Initialization and | * + Initialization and configuration | ||
* + Data transfers functions | * + Data transfers functions | ||
* + DMA transfers management | * + DMA transfers management | ||
Line 500: | Line 507: | ||
| SPI || | | SPI || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the serial peripheral interface (SPI) peripheral: | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral state functions | ||
|- | |- | ||
| SPI_EX || | | SPI_EX || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* SPI peripheral extended functionalities : | * SPI peripheral extended functionalities : | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral control functions | ||
|- | |- | ||
| FMC_SRAM || | | FMC_SRAM || | ||
Line 522: | Line 529: | ||
| TIMER || | | TIMER || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the timer (TIM) peripheral: | ||
* + TIM | * + TIM time base initialization | ||
* + TIM | * + TIM time base start | ||
* + TIM | * + TIM time base start interruption | ||
* + TIM | * + TIM time base start DMA | ||
* + TIM | * + TIM output compare/PWM initialization | ||
* + TIM | * + TIM output compare/PWM channel configuration | ||
* + TIM | * + TIM output compare/PWM start | ||
* + TIM | * + TIM output compare/PWM start interruption | ||
* + TIM | * + TIM output compare/PWM start DMA | ||
* + TIM | * + TIM input capture initialization | ||
* + TIM | * + TIM input capture channel configuration | ||
* + TIM | * + TIM input capture start | ||
* + TIM | * + TIM input capture start interruption | ||
* + TIM | * + TIM input capture start DMA | ||
* + TIM | * + TIM one pulse initialization | ||
* + TIM | * + TIM one pulse channel configuration | ||
* + TIM | * + TIM one pulse start | ||
* + TIM | * + TIM encoder interface initialization | ||
* + TIM | * + TIM encoder interface start | ||
* + TIM | * + TIM encoder interface start interruption | ||
* + TIM | * + TIM encoder interface start DMA | ||
* + Commutation | * + Commutation event configuration with interruption and DMA | ||
* + TIM OCRef clear configuration | * + TIM OCRef clear configuration | ||
* + TIM | * + TIM external clock configuration | ||
|- | |- | ||
| TIMER_EX || | | TIMER_EX || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the timer extended peripheral: | ||
* + Time | * + Time hall sensor interface initialization | ||
* + Time | * + Time hall sensor interface start | ||
* + Time | * + Time complementary signal break and dead time configuration | ||
* + Time | * + Time controller and receiver synchronization configuration | ||
* + Time | * + Time output compare/PWM channel configuration (for channels 5 and 6) | ||
* + Timer remapping capabilities configuration | * + Timer remapping capabilities configuration | ||
|- | |- | ||
| UART || | | UART || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the universal asynchronous receiver transmitter peripheral (UART). | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral control functions | ||
|- | |- | ||
| UART_EX || | | UART_EX || | ||
* This driver provides firmware functions to manage the following extended | * This driver provides firmware functions to manage the following extended | ||
* functionalities of the | * functionalities of the universal synchronous receiver transmitter peripheral (USART). | ||
* + Peripheral | * + Peripheral control functions | ||
|- | |- | ||
| U(S)ART || | | U(S)ART || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the universal (synchronous) asynchronous receiver transmitter | ||
* | * peripheral (U(S)ART). | ||
* + Initialization and | * + Initialization and deinitialization functions | ||
* + | * + I/O operation functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral state and error functions | ||
* + Peripheral | * + Peripheral control functions | ||
|} | |} | ||
Line 589: | Line 596: | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the ADC peripheral: | * functionalities of the ADC peripheral: | ||
* + Initialization/ | * + Initialization/deinitialization functions | ||
* + Configuration functions (ADC instance, group regular, group injected, | * + Configuration functions (ADC instance, group regular, group injected, | ||
* channels, analog watchdog, oversampling, multimode) | * channels, analog watchdog, oversampling, multimode) | ||
Line 603: | Line 610: | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the DMA peripheral: | * functionalities of the DMA peripheral: | ||
* + Initialization/ | * + Initialization/deinitialization functions | ||
* + Configuration functions | * + Configuration functions | ||
* + IT/FLAGS management functions | * + IT/FLAGS management functions | ||
Line 610: | Line 617: | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the EXTI peripheral: | * functionalities of the EXTI peripheral: | ||
* + Initialization/ | * + Initialization/deinitialization functions | ||
* + IT/FLAGS/Trigger management functions | * + IT/FLAGS/Trigger management functions | ||
* + Configuration functions | * + Configuration functions | ||
Line 616: | Line 623: | ||
| FMC || | | FMC || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the | * functionalities of the flexible memory controller (FMC) peripheral memories: | ||
* + Initialization/ | * + Initialization/deinitialization functions | ||
* + Peripheral | * + Peripheral control functions | ||
* + Peripheral | * + Peripheral state functions | ||
|- | |- | ||
| GPIO || | | GPIO || | ||
Line 631: | Line 638: | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the I<sup>2</sup>C peripheral: | * functionalities of the I<sup>2</sup>C peripheral: | ||
* + Initialization/ | * + Initialization/deinitialization functions | ||
* + IT/FLAGS management functions | * + IT/FLAGS management functions | ||
* +Data management functions | * +Data management functions | ||
Line 639: | Line 646: | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the LPTIM peripheral: | * functionalities of the LPTIM peripheral: | ||
* + Initialization/ | * + Initialization/deinitialization functions | ||
* + IT/FLAGS management functions | * + IT/FLAGS management functions | ||
* + Configuration (Trigger / Clock / Encoder / LPTIM) functions | * + Configuration (Trigger / Clock / Encoder / LPTIM) functions | ||
Line 646: | Line 653: | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the Direct Memory Access (DMA) peripheral: | * functionalities of the Direct Memory Access (DMA) peripheral: | ||
* + Channel | * + Channel management functions (Instance, block, buffer, endianess etc) | ||
* + SRC/DES operation functions | * + SRC/DES operation functions | ||
* + | * + Hardware trigger control | ||
|- | |- | ||
| PWR || | | PWR || | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the PWR peripheral: | * functionalities of the PWR peripheral: | ||
* + | * + Deinitialization functions | ||
|- | |- | ||
| RCC || | | RCC || | ||
Line 661: | Line 668: | ||
* + RTC/TIMERS functions | * + RTC/TIMERS functions | ||
* + IT/FLAGS management functions | * + IT/FLAGS management functions | ||
* + | * + Deinitialization functions | ||
* + Get system and peripherals clocks frequency functions | * + Get system and peripherals clocks frequency functions | ||
|- | |- | ||
Line 667: | Line 674: | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the RTC peripheral: | * functionalities of the RTC peripheral: | ||
* + Initialization/ | * + Initialization/deinitialization functions | ||
* + TIME/DATE/ALM functions | * + TIME/DATE/ALM functions | ||
* + Configuration functions | * + Configuration functions | ||
Line 687: | Line 694: | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the TIM peripheral: | * functionalities of the TIM peripheral: | ||
* + Initialization/ | * + Initialization/deinitialization functions | ||
* + Configuration functions (Time base, | * + Configuration functions (Time base, capture compare, output and input channel, | ||
* | * timer synchro, break, DMA burst mode ) | ||
* + Counter clock selection functions | * + Counter clock selection functions | ||
* + Timer input remapping functions | * + Timer input remapping functions | ||
Line 699: | Line 706: | ||
* This driver provides firmware functions to manage the following | * This driver provides firmware functions to manage the following | ||
* functionalities of the USART peripheral: | * functionalities of the USART peripheral: | ||
* + Initialization/ | * + Initialization/deinitialization functions | ||
* + Configuration functions (Irda, | * + Configuration functions (Irda, smartcard, half duplex, | ||
* SPI | * SPI slave, LIN, Driver enable) | ||
* + Advanced configurations services functions | * + Advanced configurations services functions | ||
* + IT/FLAGS management functions | * + IT/FLAGS management functions | ||
Line 711: | Line 718: | ||
====BSP drivers==== | ====BSP drivers==== | ||
The BSP | The '''BSP drivers''' offer a set of APIs relative to the hardware components available in the hardware boards (LEDs, Buttons and COM port). {{Board | type=257x-EV1}} and {{Board | type=257x-DK}}. | ||
├── 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 to {{Board | type=257x-EV1}}. | BSP Components are external components which can be attached to {{Board | type=257x-EV1}} and {{Board | type=257x-DK}}. | ||
{| class="st-table" | {| class="st-table" | ||
! STM32CubeMP2 BSP Component Items || Description | ! STM32CubeMP2 BSP Component Items || Description | ||
Line 749: | Line 764: | ||
|- | |- | ||
|}<br> | |}<br> | ||
===Middlewares=== | ===Middlewares=== | ||
The '''Middlewares''' folder contains all available '''STM32Cube Middlewares''' including: | The '''Middlewares''' folder contains all available '''STM32Cube Middlewares''' including: | ||
* | * FreeRTOS | ||
* OpenAMP | * OpenAMP | ||
* USBPD | * {{CodeSource | STM32CubeMP2 | Middlewares/ST/STM32_USBPD_Library/ | STM32_USBPD_Library}} | ||
{{ReviewsComments|-- [[User:Nathalie Sangouard|Nathalie Sangouard]] ([[User talk:Nathalie Sangouard|talk]]) 11:57, 27 June 2024 (CEST)<br />where can we find some information on USBPD? could you provide a ref internal or external ?}} | |||
{{ReviewsComments|-- [[User:Sachin Verma|Sachin Verma]] ([[User talk:Sachin Verma|talk]]) 12:09, 28 June 2024 (CEST)<br />Added a reference to the implementation of the Library.}} | |||
{{info| '''Note:''' | {{info| '''Note:''' | ||
* Refer to [[STM32CubeMP2_Package_architecture#Level_1_-28Middlewares-29|Description of Middlewares]] to get description of middlewares available in''' STM32CubeMP2 Package''' | * Refer to [[STM32CubeMP2_Package_architecture#Level_1_-28Middlewares-29|Description of Middlewares]] to get description of middlewares available in''' STM32CubeMP2 Package'''. | ||
}} | }} | ||
Line 768: | Line 785: | ||
The list of projects is available here. {{CodeSource | STM32CubeMP2html | Projects/STM32CubeProjectsList.html}} | |||
==== Examples, applications and demonstrations | ==== Examples, applications, and demonstrations ==== | ||
=====List of all applications===== | =====List of all applications===== | ||
===== Brief | ├── 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 | |||
└── STM32MP257F-EV1 | |||
├── Applications | |||
│ ├── FreeRTOS | |||
│ │ ├── FreeRTOS_MsgQueue | |||
│ │ ├── FreeRTOS_Semaphore | |||
│ │ └── FreeRTOS_ThreadCreation | |||
│ ├── OpenAMP | |||
│ │ └── OpenAMP_TTY_echo | |||
│ ├── TFM | |||
│ │ └── TFM_Protected_Storage | |||
│ └── USBPD | |||
│ └── USBPD_DRP_UCSI | |||
├── Demonstrations | |||
│ └── 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 | |||
===== Brief description of all applications/examples part of the package ===== | |||
{|style="width: 100%" | |||
! Level !! Module Name !! Project Name !! Description !! {{Board | type=257F-EV1|name=short}} !! {{Board | type=257F-DK|name=short}} !! 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 || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | |||
|- | |||
| || Total number of Demonstrations: 2 || || || 1 || 1 || || | |||
|- | |||
! '''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 || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | |||
|- | |||
| || Total number of Templates: 1 || || || || || || | |||
|- | |||
! '''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 || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | |||
|- | |||
| || Total number of LL Templates: 1 || || || || || || | |||
|- | |- | ||
! | ! '''Applications''' !! !! !! !! !! !! !! | ||
|- | |- | ||
| | | || FreeRTOS || FreeRTOS_MsgQueue || Demonstrate MsgQueue API || x || x || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || FreeRTOS || FreeRTOS_ThreadCreation || How to implement thread creation using CMSIS RTOS API. || x || x || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || FreeRTOS || FreeRTOS_Semaphore || How to use semaphores with CMSIS RTOS API || x || x || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || FreeRTOS || FreeRTOS_Timers || How to use timers of CMSIS RTOS API. || x || x || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-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 || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || TFM || TFM_Protected_Storage || It demonstrates an example of Protected Storage API (PSA) usage provided by the trusted firmware (TFM) middleware. || x || x || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-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<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || Total number of Applications: 6 || || || || || || | ||
|- | |- | ||
! '''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 || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-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 || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-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 || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || Total number of LL Examples: 3 || || || || || || | ||
|- | |- | ||
! '''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<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || I3C || I3C_Target_I2C_ComDMA || Handle I2C data buffer transmission/reception between two boards, using DMA. || x || - || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || I3C || I3C_Controller_InBandInterrupt_IT || How to handle an In-Band-Interrupt event between an I3C Controller and I3C Targets || - || x || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || I3C || I3C_Target_InBandInterrupt_IT || How to handle I2C communication as I3C Controller data buffer transmission/reception between two boards, using DMA. || - || x || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || SPI || SPI_FullDuplex_ComDMA || This example shows how to perform SPI data buffer transmission/reception between two boards via DMA. || x || x || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || LPTIM || LPTIM_PulseCounter || This example describes how to configure and use LPTIM to count pulses through the LPTIM HAL API. || x || x || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-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 || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || GPIO || GPIO_EXTI || How to configure external interrupt lines. || x || x || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || I2C || I2C_TwoBoards_ComDMA || How to handle I2C data buffer transmission/reception between two boards, via DMA. || x || - || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || I2C || I2C_TwoBoards_ComPolling || How to handle I2C data buffer transmission/reception between two boards, via Polling. || x || - || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || I2C || I2C_TwoBoards_ComIT || I2C data buffer transmission/reception between two boards, via Interrupt. || - || x || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || CRC || CRC_Bytes_Stream_7bit_CRC || Configure and use CRC HAL API to calculate 7 bit CRC || x || x || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || CRC || CRC_UserDefinedPolynomial || Compute CRC on a buffer using a User defined polynomial || x || || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-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<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || CRYP || 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<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || CRYP || 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 || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-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 || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |- | ||
| | | || DMA || DMA_RepeatedBlock || This example describes how to configure and use the DMA HAL API to perform repeated block transactions. || x || x || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | ||
|- | |||
| || FDCAN || FDCAN_Classic_Frame_Networking || Configure the FDCAN peripheral to send and receive Classic CAN frames in normal mode. || x || - || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | |||
|- | |||
| || FDCAN || FDCAN_Com_IT || Demonstrate Interrupt Process Communication between two FDCAN units || x || - || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | |||
|- | |||
| || FDCAN || FDCAN_Loopback || Configure the FDCAN to operate in loopback mode. || x || - || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-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<sup>®</sup> Cortex<sup>®</sup>-M33 | |||
|- | |||
| || ADC || ADC_InternalChannelConversion || Configure and use the ADC to retrieve an internal ADC channel. || x || - || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | |||
|- | |||
| || ADC || 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<sup>®</sup> Cortex<sup>®</sup>-M33 | |||
|- | |||
| || ADC || ADC_RegularConversion_Polling || Use the ADC in Polling mode to convert data through the HAL API. || x || - || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | |||
|- | |||
| || LTDC || LTDC_Display_3rdLayer || This example demonstrates CM33 controlled 3rd Layer non-protected while displaying standard HMI on linux side. || x || - || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-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<sup>®</sup> Cortex<sup>®</sup>-M33 | |||
|- | |||
| || TIM || 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<sup>®</sup> Cortex<sup>®</sup>-M33 | |||
|- | |||
| || TIM || TIM_PWMOutput || This example shows how to configure the TIM peripheral in PWM (Pulse Width Modulation) mode. || x || x || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | |||
|- | |||
| || TIM || 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<sup>®</sup> Cortex<sup>®</sup>-M33 | |||
|- | |||
| || TIM || TIM_InputCapture || Use the TIM peripheral to measure the frequency of an external signal. || - || x || Production || Arm<sup>®</sup> Cortex<sup>®</sup>-M33 | |||
|- | |||
| || Total number of Examples: 31 || || || || || || | |||
|- | |||
! Total number of projects: 56 || || || || || || || | |||
|} | |} | ||
==== Signing the STM32CubeMP2 firmware ==== | |||
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 [[How_to_protect_the_coprocessor_firmware#Firmware_signature | here]], to sign your STM32CubeMP2 firmware binaries. | |||
==Get started with STM32CubeMP2 Package == | ==Get started with STM32CubeMP2 Package == | ||
Line 904: | Line 1,025: | ||
<noinclude> | <noinclude> | ||
[[Category:STM32CubeMP2 Package|01]] | [[Category:STM32CubeMP2 Package|01]] | ||
{{PublicationRequestId | 32061 | 2024-08-22| }} | |||
</noinclude> | </noinclude> |
Latest revision as of 13:13, 28 August 2024
This article introduces the structure and the content of the STM32CubeMP2 package, the embedded software part of STM32Cube™, running on the Arm® Cortex®-M33 coprocessor. It references also other interesting wiki articles to better understand and use the STM32CubeMP2 package.
1. What is the STM32CubeMP2 package
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
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.
2. Software architecture overview
Software architecture overview is described in STM32CubeMP2 Package architecture.
3. STM32CubeMP2 Package structure
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 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
This chapter describes the content of the STM32CubeMP2 Package (drivers, middleware components, etc.).
4.1. Drivers
The Drivers folder contains all the STM32Cube Drivers, including BSP and HAL drivers.
The STM32CubeMP25 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
STM32CubeMP2 HAL Driver items | Description |
---|---|
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
|
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
|
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
|
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
|
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
|
CRYP_EX |
* This driver provides firmware functions to manage the following
* functionalities of CRYP extension peripheral:
* + Extended AES processing functions
|
CSI |
* This file provides firmware functions to manage the following
* functionalities of the digital camera interface (CSI) peripheral:
* + Initialization and de-initialization functions
* + I/O operation functions
* + Peripheral control functions
* + Peripheral state and error functions
|
DCACHE |
* This file provides firmware functions to manage the following
* functionalities of the DCACHE.
* + Initialization and configuration
* + Cache coherency command
* + Monitoring management
|
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
|
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
|
DDR |
* This driver provides firmware functions to manage the following
* functionalities of the double data rate synchronous dynamic random
* access memory (DDR-SDRAM) peripheral, through its controller
* (DDRCTRL) and its physical interface controller (DDRPHYC).
|
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
|
DMA_EX |
* This driver provides firmware functions to manage the following
* functionalities of the DMA extension peripheral:
* + Extended features functions
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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.
|
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
|
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
|
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
|
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
|
I2C_EX |
* This driver provides firmware functions to manage the following
* functionalities of I2C extended peripheral:
* + Filter mode functions
* + WakeUp mode functions
* + FastModePlus functions
|
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
|
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
|
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
|
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.
|
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
|
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
|
MMC_EX |
* This driver provides firmware functions to manage the following
* functionalities of the secure digital (MMC) peripheral:
* + Extended features functions
|
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
|
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
|
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
|
PWR_EX |
* This driver provides firmware functions to manage the following
* functionalities of PWR extension peripheral:
* + Peripheral extended features functions
|
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
|
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.
|
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
|
RCC_EX |
* This driver provides firmware functions to manage the following
* functionalities RCC extension peripheral:
* + Extended peripheral control functions
|
RIF |
* This file provides firmware functions to manage the following
* functionalities of RIF:
* + RISC initialization and configuration functions
* + IAC initialization and configuration functions
|
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
|
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
|
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
|
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
|
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
|
SAI_EX |
* This driver provides firmware functions to manage the following
* functionality of the SAI peripheral controller:
* + Modify PDM microphone delays.
|
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
|
SD_EX |
* This driver provides firmware functions to manage the following
* functionalities of the secure digital (SD) peripheral:
* + Extended features functions
|
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
|
SMARTCARD_EX |
* This driver provides extended firmware functions to manage the following
* functionalities of the smartCard.
* + Initialization and deinitialization functions
* + Peripheral control functions
|
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
|
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
|
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
|
SPI_EX |
* This driver provides firmware functions to manage the following
* SPI peripheral extended functionalities :
* + I/O operation functions
* + Peripheral control functions
|
FMC_SRAM |
* This driver provides a generic firmware to drive SRAM memories
* mounted as external device.
|
FMC_NAND |
* This driver provides a generic firmware to drive NAND memories
* mounted as external device.
|
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
|
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
|
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
|
UART_EX |
* This driver provides firmware functions to manage the following extended
* functionalities of the universal synchronous receiver transmitter peripheral (USART).
* + Peripheral control functions
|
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
|
4.1.2. LL drivers
STM32CubeMP2 LL Driver items | Description |
---|---|
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
|
DELAYBLOCK |
* This file provides firmware functions to manage the following
* functionalities of the DelayBlock peripheral:
* + input clock frequency
* + up to 12 oversampling phases
|
DMA |
* This driver provides firmware functions to manage the following
* functionalities of the DMA peripheral:
* + Initialization/deinitialization functions
* + Configuration functions
* + IT/FLAGS management functions
|
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
|
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
|
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
|
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
|
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
|
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
|
PWR |
* This driver provides firmware functions to manage the following
* functionalities of the PWR peripheral:
* + Deinitialization functions
|
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
|
RTC |
* This driver provides firmware functions to manage the following
* functionalities of the RTC peripheral:
* + Initialization/deinitialization functions
* + TIME/DATE/ALM functions
* + Configuration functions
|
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
|
SPI |
* This driver provides firmware functions to manage the following
* functionalities of the SPI peripheral:
* + Control and configuration functions
|
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
|
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
|
4.1.3. 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). STM32MP257x-EV1 Evaluation board and STM32MP257x-DK Discovery kit
.
├── 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 to STM32MP257x-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
The Middlewares folder contains all available STM32Cube Middlewares including:
- FreeRTOS
- OpenAMP
- STM32_USBPD_Library
4.3. Projects
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
4.3.1.1. List of all applications
├── 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
└── STM32MP257F-EV1
├── Applications
│ ├── FreeRTOS
│ │ ├── FreeRTOS_MsgQueue
│ │ ├── FreeRTOS_Semaphore
│ │ └── FreeRTOS_ThreadCreation
│ ├── OpenAMP
│ │ └── OpenAMP_TTY_echo
│ ├── TFM
│ │ └── TFM_Protected_Storage
│ └── USBPD
│ └── USBPD_DRP_UCSI
├── Demonstrations
│ └── 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. Brief description of all applications/examples part of the package
4.3.2. Signing the STM32CubeMP2 firmware
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
To know how to get it, read STM32CubeMP2 Package - Getting Started article.