# stmicroelectronics/stm32cubeh7 architecture

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

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

## Overview

STM32CubeH7 is an embedded firmware package for STM32H7 boards. Developers select board-specific templates, examples, applications, or demonstrations; firmware runs on the target board and uses CMSIS, HAL/LL, BSP, and middleware capabilities. The tree and README establish these package-level roles, while the excerpts show selected DSP and FatFs implementations. Many project-to-driver calls are unsampled, so those links are omitted rather than inferred.

Main entry points: [`Drivers/CMSIS/DSP/Source/ControllerFunctions/ControllerFunctions.c`](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Drivers/CMSIS/DSP/Source/ControllerFunctions/ControllerFunctions.c) (Controller functions), [`Projects/NUCLEO-H723ZG/Demonstrations/Src/fatfs_storage.c`](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/NUCLEO-H723ZG/Demonstrations/Src/fatfs_storage.c) (FatFs storage), [`Projects/NUCLEO-H723ZG/Templates/Src/main.c`](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/NUCLEO-H723ZG/Templates/Src/main.c) (Board templates), [`Projects/NUCLEO-H723ZG/Examples_LL/ADC/ADC_AnalogWatchdog/Src/main.c`](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/NUCLEO-H723ZG/Examples_LL/ADC/ADC_AnalogWatchdog/Src/main.c) (ADC watchdog example)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_platform["Core libraries"]
  node_cmsis_dsp["CMSIS DSP"]
  node_controller["Controller functions"]
  node_pid_init["PID initialization<br/>[arm_pid_init_q15.c]"]
  node_sin_cos["Sine and cosine<br/>[arm_sin_cos_f32.c]"]
end

subgraph group_board["Board support"]
  node_adafruit_bsp["Adafruit shield BSP<br/>[adafruit_802.c]"]
end

subgraph group_projects["Firmware projects"]
  node_templates["Board templates<br/>[main.c]"]
  node_adc_example["ADC watchdog example<br/>[main.c]"]
  node_dac_example["DAC waveform example<br/>[main.c]"]
  node_hdp_app["HDP application<br/>[main.c]"]
  node_hdp_boot["HDP boot<br/>[main.c]"]
  node_paint_app["LTDC paint<br/>[main.c]"]
  node_fractal_app["FPU fractal<br/>[main.c]"]
end

subgraph group_storage["Storage and display"]
  node_fatfs_storage["FatFs storage<br/>[fatfs_storage.c]"]
  node_picture_storage["SD picture storage<br/>[fatfs_storage.c]"]
  node_msc_storage["USB MSC storage<br/>[usbd_storage.c]"]
  node_fatfs[("FatFs middleware")]
  node_lcd["LCD drawing utility"]
end

node_developer(("Firmware developer"))
node_board_target{{"STM32H7 board"}}

node_developer -->|"selects firmware"| node_templates
node_developer -->|"selects example"| node_adc_example
node_developer -->|"selects example"| node_dac_example
node_developer -->|"selects application"| node_hdp_app
node_developer -->|"selects application"| node_paint_app
node_templates -->|"runs on"| node_board_target
node_adc_example -->|"runs on"| node_board_target
node_dac_example -->|"runs on"| node_board_target
node_hdp_app -->|"runs on"| node_board_target
node_paint_app -->|"runs on"| node_board_target
node_controller -->|"includes"| node_pid_init
node_controller -->|"includes"| node_sin_cos
node_cmsis_dsp -.->|"provides functions"| node_controller
node_fatfs_storage -->|"reads and writes"| node_fatfs
node_fatfs_storage -->|"draws bitmap"| node_lcd
node_picture_storage -->|"reads files"| node_fatfs
node_msc_storage -.->|"uses SD card"| node_board_target

click node_cmsis_dsp "https://github.com/stmicroelectronics/stm32cubeh7/tree/master/Drivers/CMSIS/DSP"
click node_controller "https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Drivers/CMSIS/DSP/Source/ControllerFunctions/ControllerFunctions.c"
click node_pid_init "https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Drivers/CMSIS/DSP/Source/ControllerFunctions/arm_pid_init_q15.c"
click node_sin_cos "https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Drivers/CMSIS/DSP/Source/ControllerFunctions/arm_sin_cos_f32.c"
click node_adafruit_bsp "https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Drivers/BSP/Adafruit_Shield/adafruit_802.c"
click node_templates "https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/NUCLEO-H723ZG/Templates/Src/main.c"
click node_adc_example "https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/NUCLEO-H723ZG/Examples_LL/ADC/ADC_AnalogWatchdog/Src/main.c"
click node_dac_example "https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/NUCLEO-H743ZI/Examples_LL/DAC/DAC_GenerateWaveform_TriggerHW/Src/main.c"
click node_hdp_app "https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/STM32H735G-DK/Applications/HDP/HDP_Appli/Src/main.c"
click node_hdp_boot "https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/STM32H735G-DK/Applications/HDP/HDP_Boot/Src/main.c"
click node_paint_app "https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/STM32H750B-DK/Applications/Display/LTDC_Paint/Src/main.c"
click node_fractal_app "https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/STM32H747I-DISCO/Applications/FPU/FPU_Fractal/CM7/Src/main.c"
click node_fatfs_storage "https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/NUCLEO-H723ZG/Demonstrations/Src/fatfs_storage.c"
click node_picture_storage "https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/STM32H743I-EVAL/Applications/Display/LTDC_PicturesFromSDCard/Src/fatfs_storage.c"
click node_msc_storage "https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/STM32H743I-EVAL/Applications/USB_Device/MSC_Standalone/Src/usbd_storage.c"

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_dsp,node_controller,node_pid_init,node_sin_cos toneBlue
class node_adafruit_bsp toneAmber
class node_templates,node_adc_example,node_dac_example,node_hdp_app,node_hdp_boot,node_paint_app,node_fractal_app toneMint
class node_fatfs_storage,node_picture_storage,node_msc_storage,node_fatfs,node_lcd toneRose
class node_developer,node_board_target toneIndigo
```

## Components

### Core libraries

- [CMSIS DSP](https://github.com/stmicroelectronics/stm32cubeh7/tree/master/Drivers/CMSIS/DSP): `Drivers/CMSIS/DSP`
- [Controller functions](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Drivers/CMSIS/DSP/Source/ControllerFunctions/ControllerFunctions.c): `Drivers/CMSIS/DSP/Source/ControllerFunctions/ControllerFunctions.c`
- [PID initialization](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Drivers/CMSIS/DSP/Source/ControllerFunctions/arm_pid_init_q15.c): `Drivers/CMSIS/DSP/Source/ControllerFunctions/arm_pid_init_q15.c`
- [Sine and cosine](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Drivers/CMSIS/DSP/Source/ControllerFunctions/arm_sin_cos_f32.c): `Drivers/CMSIS/DSP/Source/ControllerFunctions/arm_sin_cos_f32.c`

### Board support

- [Adafruit shield BSP](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Drivers/BSP/Adafruit_Shield/adafruit_802.c): `Drivers/BSP/Adafruit_Shield/adafruit_802.c`

### Firmware projects

- [Board templates](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/NUCLEO-H723ZG/Templates/Src/main.c): `Projects/NUCLEO-H723ZG/Templates/Src/main.c`
- [ADC watchdog example](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/NUCLEO-H723ZG/Examples_LL/ADC/ADC_AnalogWatchdog/Src/main.c): `Projects/NUCLEO-H723ZG/Examples_LL/ADC/ADC_AnalogWatchdog/Src/main.c`
- [DAC waveform example](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/NUCLEO-H743ZI/Examples_LL/DAC/DAC_GenerateWaveform_TriggerHW/Src/main.c): `Projects/NUCLEO-H743ZI/Examples_LL/DAC/DAC_GenerateWaveform_TriggerHW/Src/main.c`
- [HDP application](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/STM32H735G-DK/Applications/HDP/HDP_Appli/Src/main.c): `Projects/STM32H735G-DK/Applications/HDP/HDP_Appli/Src/main.c`
- [HDP boot](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/STM32H735G-DK/Applications/HDP/HDP_Boot/Src/main.c): `Projects/STM32H735G-DK/Applications/HDP/HDP_Boot/Src/main.c`
- [LTDC paint](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/STM32H750B-DK/Applications/Display/LTDC_Paint/Src/main.c): `Projects/STM32H750B-DK/Applications/Display/LTDC_Paint/Src/main.c`
- [FPU fractal](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/STM32H747I-DISCO/Applications/FPU/FPU_Fractal/CM7/Src/main.c): `Projects/STM32H747I-DISCO/Applications/FPU/FPU_Fractal/CM7/Src/main.c`

### Storage and display

- [FatFs storage](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/NUCLEO-H723ZG/Demonstrations/Src/fatfs_storage.c): `Projects/NUCLEO-H723ZG/Demonstrations/Src/fatfs_storage.c`
- [SD picture storage](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/STM32H743I-EVAL/Applications/Display/LTDC_PicturesFromSDCard/Src/fatfs_storage.c): `Projects/STM32H743I-EVAL/Applications/Display/LTDC_PicturesFromSDCard/Src/fatfs_storage.c`
- [USB MSC storage](https://github.com/stmicroelectronics/stm32cubeh7/blob/master/Projects/STM32H743I-EVAL/Applications/USB_Device/MSC_Standalone/Src/usbd_storage.c): `Projects/STM32H743I-EVAL/Applications/USB_Device/MSC_Standalone/Src/usbd_storage.c`
- **FatFs middleware**
- **LCD drawing utility**

### Other components

- **Firmware developer**
- **STM32H7 board**

## Connections

- Firmware developer → Board templates: selects firmware (evidence: `README.md`)
- Firmware developer → ADC watchdog example: selects example (evidence: `README.md`)
- Firmware developer → DAC waveform example: selects example (evidence: `README.md`)
- Firmware developer → HDP application: selects application (evidence: `README.md`)
- Firmware developer → LTDC paint: selects application (evidence: `README.md`)
- Board templates → STM32H7 board: runs on (evidence: `README.md`)
- ADC watchdog example → STM32H7 board: runs on (evidence: `README.md`)
- DAC waveform example → STM32H7 board: runs on (evidence: `README.md`)
- HDP application → STM32H7 board: runs on (evidence: `README.md`)
- LTDC paint → STM32H7 board: runs on (evidence: `README.md`)
- Controller functions → PID initialization: includes (evidence: `Drivers/CMSIS/DSP/Source/ControllerFunctions/ControllerFunctions.c`)
- Controller functions → Sine and cosine: includes (evidence: `Drivers/CMSIS/DSP/Source/ControllerFunctions/ControllerFunctions.c`)
- CMSIS DSP → Controller functions: provides functions (evidence: `Drivers/CMSIS/DSP/Source/ControllerFunctions/ControllerFunctions.c`)
- FatFs storage → FatFs middleware: reads and writes (evidence: `Projects/NUCLEO-H723ZG/Demonstrations/Src/fatfs_storage.c`)
- FatFs storage → LCD drawing utility: draws bitmap (evidence: `Projects/NUCLEO-H723ZG/Demonstrations/Src/fatfs_storage.c`)
- SD picture storage → FatFs middleware: reads files (evidence: `Projects/STM32H743I-EVAL/Applications/Display/LTDC_PicturesFromSDCard/Src/fatfs_storage.c`)
- USB MSC storage → STM32H7 board: uses SD card
