# stmicroelectronics/stm32cubewba architecture

> Architecture diagram of the GitHub repository stmicroelectronics/stm32cubewba, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/stmicroelectronics/stm32cubewba
- Repository: https://github.com/stmicroelectronics/stm32cubewba

## Overview

STM32CubeWBA is an embedded firmware package for STM32WBA MCUs, combining reusable drivers and middleware with board projects, examples, and utilities. The principal workflow is an engineer selecting a board project or example, integrating package components, and running firmware on the MCU; the repository also provides standalone libraries and configuration tools. The graph preserves documented product areas and sampled storage and DSP layers. Source excerpts are partial, so links between project applications and individual libraries are omitted where their runtime calls were not shown.

Main entry points: [`Projects/Common/WPAN/Interfaces/storage_interface.c`](https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/Common/WPAN/Interfaces/storage_interface.c) (ITS storage interface), [`Projects/B-WBA5M-WPAN/Applications/BLE/BLE_Sensor/Core/Src/main.c`](https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/B-WBA5M-WPAN/Applications/BLE/BLE_Sensor/Core/Src/main.c) (BLE sensor application), [`Projects/B-WBA5M-WPAN/Templates/TrustZoneDisabled/Src/main.c`](https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/B-WBA5M-WPAN/Templates/TrustZoneDisabled/Src/main.c) (TrustZone templates), [`Projects/NUCLEO-WBA55CG/Examples_LL/ADC/ADC_SingleConversion_TriggerTimer_DMA_Init/Src/main.c`](https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/NUCLEO-WBA55CG/Examples_LL/ADC/ADC_SingleConversion_TriggerTimer_DMA_Init/Src/main.c) (Low-level examples)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_drivers["Drivers and libraries"]
  node_cmsis["CMSIS core headers"]
  node_dsp["DSP functions"]
end

subgraph group_middleware["Middleware"]
  node_psa["PSA ITS alternate interface<br/>[psa_its_alt.h]"]
  node_storage_template["Storage interface template"]
end

subgraph group_projects["Firmware projects"]
  node_persistent["Persistent storage"]
  node_storage["ITS storage interface"]
  node_ble["BLE sensor application<br/>[main.c]"]
  node_trustzone["TrustZone templates<br/>[main.c]"]
  node_ll_examples["Low-level examples<br/>[main.c]"]
  node_mbedtls_apps["MbedTLS applications<br/>[main.c]"]
end

subgraph group_utilities["Utilities"]
  node_rot_tool["Root-of-trust config tool<br/>[main.py]"]
end

node_engineer(("Firmware engineer"))
node_package["STM32CubeWBA package"]
node_mcu["STM32WBA MCU"]
node_flash["Flash hardware"]

node_engineer -->|"selects components"| node_package
node_package -->|"includes drivers"| node_cmsis
node_package -->|"includes libraries"| node_dsp
node_package -->|"provides applications"| node_ble
node_package -->|"provides templates"| node_trustzone
node_package -->|"provides examples"| node_ll_examples
node_package -->|"provides applications"| node_mbedtls_apps
node_package -->|"includes utilities"| node_rot_tool
node_engineer -.->|"configures firmware"| node_rot_tool
node_ble -.->|"runs firmware"| node_mcu
node_trustzone -.->|"runs firmware"| node_mcu
node_ll_examples -.->|"runs firmware"| node_mcu
node_mbedtls_apps -.->|"runs firmware"| node_mcu
node_psa -->|"uses interface"| node_storage
node_storage -->|"reads and writes"| node_flash
node_engineer -.->|"uses storage module"| node_persistent
node_storage_template -->|"provides pattern"| node_storage
node_engineer -.->|"calls functions"| node_dsp

click node_cmsis "https://github.com/stmicroelectronics/stm32cubewba/tree/main/Drivers/CMSIS/Core/Include"
click node_dsp "https://github.com/stmicroelectronics/stm32cubewba/tree/main/Drivers/CMSIS/DSP/Source/ControllerFunctions"
click node_persistent "https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/Common/WPAN/Modules/PersistentStorage/persistent_storage.c"
click node_storage "https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/Common/WPAN/Interfaces/storage_interface.c"
click node_psa "https://github.com/stmicroelectronics/stm32cubewba/blob/main/Middlewares/ST/mbedtls_alt/interfaces/patterns/psa_its_alt.h"
click node_storage_template "https://github.com/stmicroelectronics/stm32cubewba/blob/main/Middlewares/ST/mbedtls_alt/interfaces/patterns/storage_interface_template.c"
click node_ble "https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/B-WBA5M-WPAN/Applications/BLE/BLE_Sensor/Core/Src/main.c"
click node_trustzone "https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/B-WBA5M-WPAN/Templates/TrustZoneDisabled/Src/main.c"
click node_ll_examples "https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/NUCLEO-WBA55CG/Examples_LL/ADC/ADC_SingleConversion_TriggerTimer_DMA_Init/Src/main.c"
click node_mbedtls_apps "https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/NUCLEO-WBA25CE1/Applications/MbedTLS_HW_ALT/Cipher_AES_CBC_EncryptDecrypt_HAL/Src/main.c"
click node_rot_tool "https://github.com/stmicroelectronics/stm32cubewba/blob/main/Utilities/PC_Software/ROT_AppliConfig/AppliCfg/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cmsis,node_dsp toneBlue
class node_psa,node_storage_template toneAmber
class node_persistent,node_storage,node_ble,node_trustzone,node_ll_examples,node_mbedtls_apps toneMint
class node_rot_tool toneRose
class node_engineer,node_package,node_mcu,node_flash toneIndigo
```

## Components

### Drivers and libraries

- [CMSIS core headers](https://github.com/stmicroelectronics/stm32cubewba/tree/main/Drivers/CMSIS/Core/Include): `Drivers/CMSIS/Core/Include`
- [DSP functions](https://github.com/stmicroelectronics/stm32cubewba/tree/main/Drivers/CMSIS/DSP/Source/ControllerFunctions): `Drivers/CMSIS/DSP/Source/ControllerFunctions`

### Middleware

- [PSA ITS alternate interface](https://github.com/stmicroelectronics/stm32cubewba/blob/main/Middlewares/ST/mbedtls_alt/interfaces/patterns/psa_its_alt.h): `Middlewares/ST/mbedtls_alt/interfaces/patterns/psa_its_alt.h`
- [Storage interface template](https://github.com/stmicroelectronics/stm32cubewba/blob/main/Middlewares/ST/mbedtls_alt/interfaces/patterns/storage_interface_template.c): `Middlewares/ST/mbedtls_alt/interfaces/patterns/storage_interface_template.c`

### Firmware projects

- [Persistent storage](https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/Common/WPAN/Modules/PersistentStorage/persistent_storage.c): `Projects/Common/WPAN/Modules/PersistentStorage/persistent_storage.c`
- [ITS storage interface](https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/Common/WPAN/Interfaces/storage_interface.c): `Projects/Common/WPAN/Interfaces/storage_interface.c`
- [BLE sensor application](https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/B-WBA5M-WPAN/Applications/BLE/BLE_Sensor/Core/Src/main.c): `Projects/B-WBA5M-WPAN/Applications/BLE/BLE_Sensor/Core/Src/main.c`
- [TrustZone templates](https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/B-WBA5M-WPAN/Templates/TrustZoneDisabled/Src/main.c): `Projects/B-WBA5M-WPAN/Templates/TrustZoneDisabled/Src/main.c`
- [Low-level examples](https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/NUCLEO-WBA55CG/Examples_LL/ADC/ADC_SingleConversion_TriggerTimer_DMA_Init/Src/main.c): `Projects/NUCLEO-WBA55CG/Examples_LL/ADC/ADC_SingleConversion_TriggerTimer_DMA_Init/Src/main.c`
- [MbedTLS applications](https://github.com/stmicroelectronics/stm32cubewba/blob/main/Projects/NUCLEO-WBA25CE1/Applications/MbedTLS_HW_ALT/Cipher_AES_CBC_EncryptDecrypt_HAL/Src/main.c): `Projects/NUCLEO-WBA25CE1/Applications/MbedTLS_HW_ALT/Cipher_AES_CBC_EncryptDecrypt_HAL/Src/main.c`

### Utilities

- [Root-of-trust config tool](https://github.com/stmicroelectronics/stm32cubewba/blob/main/Utilities/PC_Software/ROT_AppliConfig/AppliCfg/main.py): `Utilities/PC_Software/ROT_AppliConfig/AppliCfg/main.py`

### Other components

- **Firmware engineer**
- **STM32CubeWBA package**
- **STM32WBA MCU**
- **Flash hardware**

## Connections

- Firmware engineer → STM32CubeWBA package: selects components (evidence: `README.md`)
- STM32CubeWBA package → CMSIS core headers: includes drivers (evidence: `README.md`)
- STM32CubeWBA package → DSP functions: includes libraries (evidence: `README.md`)
- STM32CubeWBA package → BLE sensor application: provides applications (evidence: `README.md`)
- STM32CubeWBA package → TrustZone templates: provides templates (evidence: `README.md`)
- STM32CubeWBA package → Low-level examples: provides examples (evidence: `README.md`)
- STM32CubeWBA package → MbedTLS applications: provides applications (evidence: `README.md`)
- STM32CubeWBA package → Root-of-trust config tool: includes utilities (evidence: `README.md`)
- Firmware engineer → Root-of-trust config tool: configures firmware
- BLE sensor application → STM32WBA MCU: runs firmware
- TrustZone templates → STM32WBA MCU: runs firmware
- Low-level examples → STM32WBA MCU: runs firmware
- MbedTLS applications → STM32WBA MCU: runs firmware
- PSA ITS alternate interface → ITS storage interface: uses interface (evidence: `Middlewares/ST/mbedtls_alt/interfaces/patterns/psa_its_alt.h`)
- ITS storage interface → Flash hardware: reads and writes (evidence: `Projects/Common/WPAN/Interfaces/storage_interface.c`)
- Firmware engineer → Persistent storage: uses storage module
- Storage interface template → ITS storage interface: provides pattern (evidence: `Middlewares/ST/mbedtls_alt/interfaces/patterns/storage_interface_template.c`)
- Firmware engineer → DSP functions: calls functions
