Last edited 3 weeks ago

STM32CubeMP13 Package

Applicable for STM32MP13x lines

=link

This article introduces the structure and the content of the STM32CubeMP13 Package, the embedded software part of STM32Cube™, running on the Arm® Cortex®-A7 processor. It references also other interesting wiki articles to better understand and use the STM32CubeMP13 Package.

1. What is the STM32CubeMP13 Package[edit | edit source]

STM32CubeMP13 Package, running on the Arm® Cortex®-A7 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 AzureRTOS and Free RTOS).
  • A collection of examples, running on an MPU board and allowing demonstration of a basic implementation of features from a set of IPs

2. Software architecture overview[edit | edit source]

Software architecture overview is described in STM32CubeMP13 Package architecture.

3. STM32CubeMP13 Package structure[edit | edit source]

This chapter describes the structure of the STM32CubeMP13 Package (drivers, middleware components...).

STM32CubeMP13 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 STM32MP13 device is used. This improves the library code re-usability and guarantees easy portability from one device to another. STM32CubeMP13 Package also offers a highly portable Low Layer interface (LL), which allows a quick, simple and optimized API to access the STM32MP13 registers.

The STM32CubeMP13 Package is provided with the structure shown below.

STM32MP13 Package Structure.png


4. STM32CubeMP13 Package content[edit | edit source]

This chapter describes the content of the STM32CubeMP13 Package (drivers, middleware components...). Updated for STM32CubeMP13 Package v1.2.0.

4.1. Drivers[edit | edit source]

The Drivers folder contains all the STM32Cube Drivers, including BSP and HAL drivers.

The STM32CubeMP13 Package provides all driver user manuals:

Info white.png Information

User manuals linked above are provided in "chm" format. "chm" links re-direct to github repository and they do not open in Web format. User must click on "view raw" which downloads the "chm" manual files locally. Opening downloaded files will open full user manual in book form.

4.1.1. HAL drivers[edit | edit source]

STM32CubeMP13 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 de-initialization 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
 *          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 de-initialization 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 de-initialization 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 de-initialization functions
 *           + AES processing functions
 *           + DES processing functions
 *           + TDES processing functions
 *           + MDMA 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
DCMIPP
 *          This driver provides firmware functions to manage the following
 *          functionalities of the DCMIPP (Digital Camera Interface Pixel Pipeline)  peripheral:
 *           + Initialization and de-initialization functions
 *           + IO 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).
DFSDM
 *          This driver provides firmware functions to manage the following
 *          functionalities of the Digital Filter for Sigma-Delta Modulators
 *          (DFSDM) peripherals:
 *           + Initialization and configuration of channels and filters
 *           + Regular channels configuration
 *           + Injected channels configuration
 *           + Regular/Injected Channels DMA Configuration
 *           + Interrupts and flags management
 *           + Analog watchdog feature
 *           + Short-circuit detector feature
 *           + Extremes detector feature
 *           + Clock absence detector feature
 *           + Break generation on analog watchdog or short-circuit event
DFSDM_EX
 *          This driver provides firmware functions to manage the following
 *          functionality of the DFSDM Peripheral Controller:
 *           + Set and get pulses skipping on channel.
DMA
 *          This driver provides firmware functions to manage the following
 *          functionalities of the Direct Memory Access (DMA) peripheral:
 *           + Initialization and de-initialization functions
 *           + IO 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
DTS
 *          This driver provides firmware functions to manage the following
 *          functionalities of the DTS peripheral:
 *           + Initialization and de-initialization functions
 *           + Start/Stop operation functions in polling mode.
 *           + Start/Stop operation functions in interrupt mode.
 *           + Peripheral Control functions
 *           + Peripheral State functions
ETH
 *          This driver provides firmware functions to manage the following
 *          functionalities of the Ethernet (ETH) peripheral:
 *           + Initialization and deinitialization functions
 *           + IO 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 de-initialization functions
 *           + IO operation functions
FDCAN
 *          This driver provides firmware functions to manage the following
 *          functionalities of the Flexible DataRate Controller Area Network
 *          (FDCAN) peripheral:
 *           + Initialization and de-initialization functions
 *           + IO 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 de-initialization functions
 *           + IO operation functions
 *           + Extended Peripheral Control functions
HAL
 *          This driver provides firmware functions to manage the following
 *          functionalities of HAL, Tick, SYSCFG, DBGMCU:
 *           + Initialization and de-initialization functions
 *           + HAL Initialization and de-initialization 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 de-initialization 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
 *         multi-buffer DMA-based processing for MD-5, SHA-1, SHA-224
 *         and SHA-256.
HCD
 *          This driver provides firmware functions to manage the following
 *          functionalities of the USB Peripheral Controller:
 *           + Initialization and de-initialization functions
 *           + IO operation functions
 *           + Peripheral Control functions
 *           + Peripheral State functions
I2C
 *          This driver provides firmware functions to manage the following
 *          functionalities of the Inter Integrated Circuit (I2C) peripheral:
 *           + Initialization and de-initialization functions
 *           + IO 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 de-initialization functions
 *           + IO operation functions
 *           + Peripheral State and Errors functions
LPTIM
 *          This driver provides firmware functions to manage the following 
 *          functionalities of the Low Power Timer (LPTIM) peripheral:
 *           + Initialization and de-initialization 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 de-initialization functions
 *           + IO operation functions
 *           + Peripheral Control functions
 *           + Peripheral State and Errors functions
MCE
 *          This driver provides firmware functions to manage the following
 *          functionalities of the Memory Cipher Engine (MCE) Peripheral.
MDMA
 *         This driver provides firmware functions to manage the following
 *         functionalities of the Master Direct Memory Access (MDMA) peripheral:
 *           + Initialization/de-initialization functions
 *           + I/O operation 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 de-initialization functions
 *           + IO 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
PCD
 *          This driver provides firmware functions to manage the following
 *          functionalities of the USB Peripheral Controller:
 *           + Initialization and de-initialization functions
 *           + IO operation functions
 *           + Peripheral Control functions
 *           + Peripheral State functions
PCD_EX
 *          This driver provides firmware functions to manage the following
 *          functionalities of the USB Peripheral Controller:
 *           + Extended features functions
PKA
 *          This driver provides firmware functions to manage the following
 *          functionalities of public key accelerator(PKA):
 *           + Initialization and de-initialization functions
 *           + Start an operation
 *           + Retrieve the operation result
PWR
 *          This driver provides firmware functions to manage the following
 *          functionalities of the Power Controller (PWR) peripheral:
 *           + Initialization and de-initialization 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
XSPI
 *          This driver provides firmware functions to manage the following
 *          functionalities of the XSPI interface (XSPI).
 *           + Initialization and de-initialization functions
 *           + Indirect functional mode management
 *           + Memory-mapped functional mode management
 *           + Auto-polling functional mode management
 *           + Interrupts and flags management
 *           + MDMA channel configuration for indirect functional mode
 *           + Errors management and abort functionality
RCC
 *          This driver provides firmware functions to manage the following
 *          functionalities of the Reset and Clock Control (RCC) peripheral:
 *           + Initialization and de-initialization 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
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/de-initialization functions
 *           + Calendar (Time and Date) configuration
 *           + Alarms (Alarm A and Alarm B) configuration
 *           + WakeUp Timer configuration
 *           + TimeStamp configuration
 *           + Tampers configuration
 *           + Backup Data Registers 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 Wake-up 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/de-initialization 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 de-initialization functions
 *           + IO 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 de-initialization functions
 *           + IO operation functions
 *           + Peripheral Control functions
 *           + Peripheral State and Error functions
 *           + Extended features functions
SMARTCAR_EX
 *          This driver provides extended firmware functions to manage the following
 *          functionalities of the SmartCard.
 *           + Initialization and de-initialization 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 de-initialization functions
 *           + IO 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 de-initialization functions
 *           + IO operation functions
 *           + Peripheral Control functions
 *           + Peripheral State functions
SPI_EX
 *          This driver provides firmware functions to manage the following
 *          SPI peripheral extended functionalities :
 *           + IO 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 Master and Slave 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 de-initialization functions
 *           + IO 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 de-initialization functions
 *           + IO operation functions
 *           + Peripheral Control functions
 *           + Peripheral State and Error functions
 *           + Peripheral Control functions

4.1.2. LL drivers[edit | edit source]

STM32CubeMP13 LL Driver items Description
ADC
 *          This driver provides firmware functions to manage the following
 *          functionalities of the ADC peripheral:
 *           + Initialization/de-initialization 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/de-initialization functions
 *           + Configuration functions
 *           + IT/FLAGS management functions
EXTI
 *          This driver provides firmware functions to manage the following
 *          functionalities of the EXTI peripheral:
 *           + Initialization/de-initialization 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/de-initialization 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/de-initialization 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/de-initialization functions
 *           + IT/FLAGS management functions
 *           + Configuration (Trigger / Clock / Encoder / LPTIM) functions
MDMA
 *         This driver provides firmware functions to manage the following
 *         functionalities of the Master Direct Memory Access (MDMA) peripheral:
 *           + Channel Mangenment functions (Instance, Block, Buffer, Endianess etc)
 *           + SRC/DES operation functions
 *           + HW Trigger control
PWR
 *          This driver provides firmware functions to manage the following
 *          functionalities of the PWR peripheral:
 *           + De-initialization 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
 *           + De-initialization functions
 *           + Get system and peripherals clocks frequency functions
RTC
 *          This driver provides firmware functions to manage the following
 *          functionalities of the RTC peripheral:
 *           + Initialization/de-initialization 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/de-initialization 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/de-initialization 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
USB
 *          This driver provides firmware functions to manage the following
 *          functionalities of the USB Peripheral Controller:
 *           + Initialization/de-initialization functions
 *           + I/O operation functions
 *           + Peripheral Control functions
 *           + Peripheral State functions

4.1.3. BSP drivers[edit | edit source]

The BSP (Board Specific Package) drivers are parts of the STM32CubeMPU package based on the HAL drivers and provide a set of high level APIs relative to the hardware components and features in the STM32MP135x-DK Discovery kit More info green.png. It provides API for LED, button, camera, LCD, SD card and COM ports.

STM32CubeMP13 BSP Driver items
STM32MP13xx_DISCO
stm32mp13xx_disco.c  
stm32mp13xx_disco_lcd.c 
stm32mp13xx_disco.h 
stm32mp13xx_disco_bus.c 
stm32mp13xx_disco_bus.h 
stm32mp13xx_disco_camera.c 
stm32mp13xx_disco_camera.h 
stm32mp13xx_disco_conf_template.h 
stm32mp13xx_disco_errno.h 
stm32mp13xx_disco_io.c 
stm32mp13xx_disco_io.h 
stm32mp13xx_disco_lcd.c 
stm32mp13xx_disco_lcd.h 
stm32mp13xx_disco_sd.c 
stm32mp13xx_disco_sd.h 
stm32mp13xx_disco_stpmic1.c 
stm32mp13xx_disco_stpmic1.h 


BSP Components are external components which can be attached to STM32MP135x-DK Discovery kit More info green.png.

STM32CubeMP13 BSP Component Items Description
Common
This directory contains the BSP Common components drivers.
GC2145
This driver provides a set of functions offered by GC2145 camera sensor component.
LAN8742
This driver provides a set of Ethernet PHY functions offered by LAN8742 component.
MCP23x17
This driver provides a set of functions offered by MCP23x17 IO expander component.
RK043FN48H
This directory contains the RK043FN48H-CT672B LCD component drivers.
STMIPID02
This driver provides a set of functions offered by STMIPID02 Camera De-Serializer Component.
GT911
This driver provides a set of functions offered by GT911 touchscreen Component.


4.2. Middlewares[edit | edit source]

The Middlewares folder contains all available STM32Cube Middlewares including:

  • AzureRTOS
  • Free RTOS
  • OpenBootloader
  • LwIP
  • STM32_USB_Device_Library
  • STM32_USB_Host_Library
Info white.png Information
Note:

4.3. Projects[edit | edit source]

The "Projects" folder contains all STM32Cube examples that are classified in 4 levels as described below :

  • Level 0 : Examples. It uses only the HAL drivers without any middleware component. They are available in directory Firmware/Projects/<board_name>/Examples.
  • Level 1 : Applications. It provides typical use cases of each middleware component. They are available in directory Firmware/Projects/<board_name>/Applications.
  • Level 2 : External_Loader. It showes how to program the images serially into external memory and boot from external memory. They are available in directory Firmware/Projects/<board_name>/External_Loader.
  • Level 3 : Template. It allows quick creation and building of any firmware application on a given board. They are is available in directory Firmware/Projects/<board_name>/Templates.

All examples respect the same structure :

   ├── BSP_BasicTemplates
   │   ├── readme.txt               describes the example behavior and the setup required to make it work
   │   ├── Inc                      contains all header files
   │   ├── Src                      contains all the sources code files
   │   └── STM32CubeIDE             contains the preconfigured project for STM32Cube IDE


List of Projects is available here.Projects/STM32CubeProjectsList.html


4.3.1. Examples, applications and demonstrations for STM32MP135x-DK Discovery kit More info green.png[edit | edit source]

4.3.1.1. List of all applications[edit | edit source]
  +-- STM32MP135C-DK         
  ¦   +-- Applications
  ¦   ¦   +-- FileX
  ¦   ¦   ¦  +-- Fx_MutiAccess
  ¦   ¦   ¦  +-- Fx_SRAM_File_Edit_Standalone
  ¦   ¦   ¦  +-- Fx_uSD_File_Edit
  ¦   ¦   +-- FreeRTOS
  ¦   ¦   ¦  +-- FreeRTOS_Semaphore
  ¦   ¦   ¦  +-- FreeRTOS_TaskCreation   
  ¦   ¦   +-- FSBLA
  ¦   ¦   ¦  +-- FSBLA_Sdmmc1    
  ¦   ¦   +-- Low_power_LPLV_Stop2
  ¦   ¦   ¦  +-- BSP_BasicTemplates_low_power
  ¦   ¦   ¦  +-- FSBLA_LPLV_Stop2
  ¦   ¦   +-- Low_power_Standby
  ¦   ¦   ¦  +-- BSP_BasicTemplates_low_power
  ¦   ¦   ¦  +-- FSBLA_Standby
  ¦   ¦   +-- LwIP
  ¦   ¦   ¦  +-- LwIP_TCP_Echo_Client
  ¦   ¦   ¦  +-- LwIP_TCP_Echo_Server
  ¦   ¦   ¦  +-- LwIP_UDP_Echo_Client
  ¦   ¦   ¦  +-- LwIP_UDP_Echo_Server
  ¦   ¦   ¦  +-- LwIP_UDPTCP_Echo_Server_Netconn_RTOS
  ¦   ¦   +-- NetXDuo
  ¦   ¦   ¦  +-- Nx_Iperf
  ¦   ¦   ¦  +-- Nx_MQTT_Client
  ¦   ¦   ¦  +-- Nx_TCP_Echo_Client
  ¦   ¦   ¦  +-- Nx_TCP_Echo_Server
  ¦   ¦   ¦  +-- Nx_UDP_Echo_Client
  ¦   ¦   ¦  +-- Nx_UDP_Echo_Server
  ¦   ¦   ¦  +-- Nx_WebServer
  ¦   ¦   +-- ThreadX
  ¦   ¦   ¦  +-- Tx_MPU
  ¦   ¦   ¦  +-- Tx_Thread_Creation
  ¦   ¦   ¦  +-- Tx_Thread_MsgQueue
  ¦   ¦   ¦  +-- Tx_Thread_Sync
  ¦   ¦   +--USB_Device
  ¦   ¦   ¦  +-- CDC_Standalone
  ¦   ¦   +-- UsbX
  ¦   ¦   ¦  +-- Ux_Device_CDC_ACM
  ¦   ¦   ¦  +-- Ux_Device_HID
  ¦   ¦   ¦  +-- Ux_Host_HID_CDC_ACM
  ¦   ¦   ¦  +-- Ux_Host_MSC
  ¦   +-- Examples
  ¦   ¦   +-- ADC
  ¦   ¦   ¦   +-- ADC_MultiChannelSingleConversion
  ¦   ¦   ¦   +-- ADC_SingleConversion_TriggerTimer_DMA
  ¦   ¦   ¦   +-- ADC_SingleConversion_TriggerTimer_DMA_Secure
  ¦   ¦   +-- CRC
  ¦   ¦   ¦   +-- CRC_UserDefinedPolynomial
  ¦   ¦   +-- CRYP
  ¦   ¦   ¦   +-- CRYP_AES_MDMA
  ¦   ¦   ¦   +-- CRYP_SAES_MDMA_ECB_CBC
  ¦   ¦   ¦   +-- CRYP_SAES_WrapKey
  ¦   ¦   ¦   +-- CRYP_TDESModes
  ¦   ¦   +-- DCMIPP
  ¦   ¦   ¦   +-- DCMIPP_CaptureMode_A7
  ¦   ¦   ¦   +-- DCMIPP_SnapshotMode_A7
  ¦   ¦   +-- DDR
  ¦   ¦   ¦   +-- DDR_Init
  ¦   ¦   +-- DMA
  ¦   ¦   ¦   +-- DMA_FIFOMode
  ¦   ¦   ¦   +-- DMA_FIFOMode_Secure
  ¦   ¦   +-- DTS
  ¦   ¦   ¦   +-- DTS_GetTemperature
  ¦   ¦   +-- ETZPC
  ¦   ¦   ¦   +-- ETZPC_NonSecure_Access
  ¦   ¦   +-- FDCAN
  ¦   ¦   ¦   +-- FDCAN_Loopback
  ¦   ¦   +-- GPIO
  ¦   ¦   ¦   +-- GPIO_EXTI
  ¦   ¦   +-- HASH
  ¦   ¦   ¦   +-- HASH_SHA3384SHA3512_MDMA
  ¦   ¦   +-- I2C
  ¦   ¦   ¦   +-- I2C_TwoBoards_ComIT
  ¦   ¦   +-- IWDG
  ¦   ¦   ¦   +-- IWDG_WindowMode
  ¦   ¦   +-- LPTIM
  ¦   ¦   ¦   +-- LPTIM_PulseCounter
  ¦   ¦   +-- LTDC
  ¦   ¦   ¦   +-- LTDC_Display_2Layers
  ¦   ¦   +-- MDMA
  ¦   ¦   ¦   +-- MDMA_Mem2MemTransfer
  ¦   ¦   ¦   +-- MDMA_Mem2MemTransfer_Secure
  ¦   ¦   +-- PKA
  ¦   ¦   ¦   +-- PKA_ECCDoubleBaseLadder
  ¦   ¦   ¦   +-- PKA_ECDSA_Sign
  ¦   ¦   +-- PWR
  ¦   ¦   ¦   +-- PWR_STANDBY
  ¦   ¦   ¦   +-- PWR_STANDBY_RTC
  ¦   ¦   ¦   +-- PWR_STOP_RTC
  ¦   ¦   +-- RNG
  ¦   ¦   ¦   +-- RNG_MultiRNG
  ¦   ¦   +-- RTC
  ¦   ¦   ¦   +-- RTC_Alarm
  ¦   ¦   ¦   +-- RTC_Tamper
  ¦   ¦   ¦   +-- RTC_TimeStamp
  ¦   ¦   +-- SD
  ¦   ¦   ¦   +-- SD_ReadWrite_DMALinkedList
  ¦   ¦   +-- SPI
  ¦   ¦   ¦   +-- SPI_FullDuplex_ComDMA_Master
  ¦   ¦   ¦   +-- SPI_FullDuplex_ComDMA_Slave
  ¦   ¦   ¦   +-- SPI_FullDuplex_ComIT_Master
  ¦   ¦   ¦   +-- SPI_FullDuplex_ComIT_Slave
  ¦   ¦   +-- TIM
  ¦   ¦   ¦   +-- TIM_DMABurst
  ¦   ¦   +-- UART
  ¦   ¦   ¦   +-- UART_Receive_Transmit_Console
  ¦   ¦   ¦   +-- UART_TwoBoards_ComDMA
  ¦   ¦   ¦   +-- UART_TwoBoards_ComIT
  ¦   ¦   +-- USART
  ¦   ¦   ¦   +-- USART_SlaveMode_DMA
4.3.1.2. ThreadX applications[edit | edit source]

STM32Cube firmware provides a set of functional applications covering the main features of Azure RTOS ThreadX. The ThreadX applications for STM32MP13xx MPUs are listed below.

ThreadX application Overview
Tx_Thread_Creation This application provides an example of Azure RTOS ThreadX stack usage. It shows how to develop an application using the ThreadX thread management APIs. It demonstrates how to create and destroy multiple threads using Azure RTOS ThreadX APIs. It also shows how to use a preemption threshold between threads, and change priorities on-fly.

For more information, refer to the application Projects/STM32MP135C-DK/Applications/ThreadX/Tx_Thread_Creation/README.md file.

Tx_Thread_MsgQueue This application provides an example of Azure RTOS ThreadX stack usage, and shows how to develop an application using the ThreadX message queue APIs. It also demonstrates how to send and receive messages between threads using ThreadX message queue APIs, and shows how to use the event chaining feature.

For further information, refer to the application Projects/STM32MP135C-DK/Applications/ThreadX/Tx_Thread_MsgQueue/README.md file.

Tx_Thread_Sync This application provides an example of Azure RTOS ThreadX stack usage. It shows how to develop an application using the ThreadX synchronization APIs.

For further information, refer to application Projects/STM32MP135C-DK/Applications/ThreadX/Tx_Thread_Sync/README.md file.

Tx_MPU This application provides an example of Azure RTOS ThreadX stack usage, and shows how to develop an application using the ThreadX Module feature. It also demonstrates how to load, start and unload modules, and shows how ThreadX memory protection on modules using the Memory Protection Unit (MPU). This application is only available for products having the MPU feature.

For further information,refer to the application Projects/STM32MP135C-DK/Applications/ThreadX/Tx_MPU /README.md file.


4.3.1.3. USBX Device applications[edit | edit source]

The following table provides an overview about the offered USBX Device applications:

USBX Device application Overview
HID Application This application makes the STM32 emulate a mouse USB device. When connected to a host through its USB peripheral, the STM32 is detected as an STM32 HID Mouse. The cursor moves automatically. For more details, refer to the Readme file in the application [1]

This application was implemented according to the Device Class Definition for Human Interface Device (HID) specification [2].

CDC ACM application This application makes the STM32 emulate an UART-USB Bridge. When connected to a host through its USB peripheral, the STM32 is detected as an STM32 Virtual Com port. An HyperTerminal can be opened with the detected port and a communication can be established between the STM32 Virtual comport and the STM32 ST-link (UART) port. For more details, refer to the Readme file in the application [3].

This application was implemented according to the Class definitions for Communication Devices specification[4].


4.3.1.4. NetX Duo applications[edit | edit source]

The following figures show the project architecture and main application files for an STM32MP13 application using Ethernet.

NetX Duo Application Files(1) NetX Duo Application Files(2)

STM32 Packages provide the following set of applications (the list of supported applications may differ between products and boards):

Application Short Description
Nx_TCP_Echo_Server Demonstrates how to develop a NetX TCP server to communicate with a remote client using the NetX TCP socket API. [5]
Nx_TCP_Echo_Client Demonstrates how to develop a NetX TCP client to communicate with a remote sever using the NetX TCP socket API. [6]
Nx_UDP_Echo_Server Demonstrates how to develop a NetX UDP server to communicate with a remote client using the NetX UDP socket API.[7]
Nx_UDP_Echo_Client Demonstrates how to develop a NetX UDP client to communicate with a remote sever using the NetX UDP socket API.[8]
Nx_WebServer Demonstrates how to develop Web HTTP server based application. It is designed to load files and static/dynamic web pages stored in an SD Card using a Web HTTP server, the code provides all required features to build a compliant Web HTTP Server.[9]
Nx_MQTT_Client Demonstrates how to exchange data between client and server using MQTT protocol in an encrypted mode supporting TLS v1.2.[10]
Nx_Iperf Demonstrates performance using different modes: TCP_server, UDP_server, TCP_client and UDP_client. [11]
4.3.1.5. FileX applications[edit | edit source]

STM32CubeMP13 package provides the following set of applications :

Application Short description
Fx_uSD_File_Edit Demonstrates how to develop a basic SD card file operations application. The application is designed to handle SD card insertion/removal events, and depending on that state, it starts and stops file operations from and into the SD card.

For more information, refer to the application Projects/STM32MP135C-DK/Applications/FileX/Fx_uSD_File_Edit/README.md file.

Fx_SRAM_File_Edit_Standalone This application provides an example of FileX stack usage in Standalone mode (without ThreadX). It demonstrates how to create a FAT File system in internal SRAM using FileX API.

For more information, refer to the application Projects/STM32MP135C-DK/Applications/FileX/Fx_SRAM_File_Edit_Standalone/README.md file.

Fx_MultiAccess Demonstrates the FileX concurrent file access capabilities. The application is designed to execute file operations on the SD card device, the code provides all required software code for handling SD card I/O operations.

For more information, refer to the application Projects/STM32MP135C-DK/Applications/FileX/Fx_MultiAccess/README.md file.


4.3.1.6. LevelX applications[edit | edit source]

STM32Cube MPU package provides the following set of applications :

Fx_NAND_Write_Read_File Demonstrates how to create a Fat File system on the NAND Flash memory using FileX alongside LevelX. The application is designed to execute file operations on the Micron MT29F8G08ABACAH4 NAND flash device, the code provides all the required software code to manage it properly.

For more information, refer to the application README.md file.

Fx_Nand_Write_Read_File_Sequencer Demonstrates how to create a Fat File system on the NAND Flash memory using FileX alongside LevelX. It uses hardware NAND sequencer instead of direct CPU accesses.The application is designed to execute file operations on the Micron MT29F8G08ABACAH4 NAND flash device, the code provides all the required software code to manage it properly.

For more information, refer to the application README.md file.

Fx_uSD_File_Edit Demonstrates how to develop a basic SD card file operations application. The application is designed to handle SD card insertion/removal events, and depending on that state, it starts and stops file operations from and into the SD card.

For more information, refer to the application README.md file.

4.3.1.7. Free RTOS applications[edit | edit source]

STM32Cube MPU package provides the following set of applications :

FreeRTOS_Semaphore This application creates two threads that toggle LEDs through a shared semaphore. as following: The first thread which have the higher priority obtains the semaphore and toggle the LED7 each 200 ms. After 5 seconds it releases the semaphore and suspends itself.

For more information, refer to the application README.md file.

FreeRTOS_TaskCreation This application creates two threads with the same priority, which execute in a periodic cycle of 15 seconds.

For more information, refer to the application README.md file.

4.3.1.8. LwIP applications[edit | edit source]

STM32Cube MPU package provides the following set of applications :

LwIP_TCP_Echo_Client This application guides STM32Cube HAL API users to run TCP Echo Client application based on Raw API of LwIP TCP/IP stack.

For more information, refer to the application readme.txt file.

LwIP_TCP_Echo_Server This application guides STM32Cube HAL API users to run TCP Echo Server application based on Raw API of LwIP TCP/IP stack.

For more information, refer to the application readme.txt file.

LwIP_UDP_Echo_Client This application guides STM32Cube HAL API users to run a UDP Echo Client application based on Raw API of LwIP TCP/IP stack.

For more information, refer to the application readme.txt file.

LwIP_UDP_Echo_Server This application guides STM32Cube HAL API users to run UDP Echo Server application based on Raw API of LwIP TCP/IP stack readme.txt file.
LwIP_UDPTCP_Echo_Server_Netconn_RTOS This application guides STM32Cube HAL API users to run a UDP/TCP Echo Server application based on Netconn API of LwIP TCP/IP stack.

For more information, refer to the application readme.txt file.


4.3.2. Other examples, applications and demonstrations validated by ST[edit | edit source]

Those validations have been done using an internal ST Board, aka STM32MP13XX_CUSTOM_HW, customized to validate some features, those features applicable to custom boards may not be applicable on STM32MP135F-DK board, but can be a go starting point for adaptation to your board.

   ├── STM32MP13XX_CUSTOM_HW    
   │   ├── Applications
   │   │   ├── FileX
   │   │   │  ├── Fx_emmc_File_Edit
   │   │   │  ├── Fx_Nand_Write_Read_File
   │   │   │  ├── Fx_Nand_Write_Read_File_Sequencer
   │   │   │  └── Fx_uSD_File_Edit    
   │   │   ├── FSBLA
   │   │   │  └── FSBLA_SNOR
   │   │   ├──XSPI_NOR_Programmer
   │   ├── Examples
   │   │   ├── DDR
   │   │   │   └── DDR_Init

5. Get started with STM32CubeMP13 Package[edit | edit source]

To know how to get it, read STM32CubeMP13_Package_-_Getting_started article.

6. References[edit | edit source]