STM32 Microcontroller Blockset enables you to model and deploy motor control and digital power conversion algorithms on STM32 microcontrollers (MCUs) for industrial and automotive applications.
The blockset includes device driver blocks specific to STM32 MCUs, such as ADC, PWM, and timers, and interfaces with the STM32CubeMX tool to configure these peripherals. You can generate optimized C code that calls CMSIS-DSP and CMSIS-NN library functions and deploy generated code directly to STM32 MCUs (with Embedded Coder). You can also integrate machine learning and deep learning models, such as SVMs, FC layers, and LSTMs, for virtual sensors in motor control applications.
The blockset enables you to perform processor-in-the-loop (PIL) testing to assess code execution performance and optimize code across STM32 MCUs. You can connect Simulink models to STM32 hardware for real-time signal monitoring, parameter tuning, and data logging.
Reference Applications
Product Highlights
Single-Click Deployment
Generate code and deploy to STM32 MCUs with a single click. Generated code automatically calls CMSIS-DSP for optimized signal processing and CMSIS-NN for neural network inference on Cortex-M processors.
Peripheral Support
Use driver blocks for ADC, PWM, digital I/O, UART, I2C, SPI, and FDCAN to configure STM32 MCU peripherals directly in your Simulink model.
Signal Monitoring and Parameter Tuning
Monitor signals and tune parameters in models running on STM32 devices without recompiling model.
PIL Testing
Run PIL tests from MATLAB and Simulink to verify numerical equivalence and profile execution time.
Connected I/O Simulation
Stream peripheral data from STM32 hardware into Simulink during simulation. Supported peripherals include ADC, PWM, GPIO, I2C, and SPI.
STM32Cube Integration
Import existing STM32CubeMX project (.ioc) files or create new STM32CubeMX projects in Simulink. Optionally, generate STM32CubeIDE-compatible projects.
Supported Hardware
All Nucleo, discovery, evaluation, and custom boards based on the following processor series are supported.
High Performance
- STM32H7xx (dual-core)
- STM32H7xx (single-core)
- STM32H5xx
- STM32F7xx
- STM32F4xx
- STM32F2xx
Mainstream
- STM32G4xx
- STM32G0xx
- STM32F3xx
- STM32F1xx
Ultra-Low-Power
- STM32U5xx
- STM32L5xx
- STM32L4xx
Wireless
- STM32WBxx