STM32 Microcontroller Blockset

NEW PRODUCT

 

STM32 Microcontroller Blockset

Design, simulate, and implement applications for STMicroelectronics STM32 microcontrollers

Board with the names of all major STM32 MCUs that are supported.

Reference Applications

Motor control system diagram showing controller blocks, plant model and feedback loops.

Motor Control

Diagram of a power conversion Simulink model.

Power Conversion

Signal processing workflow showing pre-processing and post-processing stages.

Signal Processing

Product Highlights

Simulink model showing the Getting Started example with STM32 hardware configuration.

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.

Simulink Library Browser displaying STM32 Microcontroller Blockset blocks.

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.

Diagram of an external mode example model.

Signal Monitoring and Parameter Tuning

Monitor signals and tune parameters in models running on STM32 devices without recompiling model.

Simulink model configured for processor-in-the-loop verification.

PIL Testing

Run PIL tests from MATLAB and Simulink to verify numerical equivalence and profile execution time.

Getting Started example model for Connected I/O with STM32 hardware.

Connected I/O Simulation

Stream peripheral data from STM32 hardware into Simulink during simulation. Supported peripherals include ADC, PWM, GPIO, I2C, and SPI.

Integration with STM32CubeMX and STM32CubeIDE

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

STM32 Microcontroller FAQs

STM32 Microcontroller Blockset is a MathWorks product that lets you design, simulate, and deploy motor control, digital power conversion and signal processing algorithms on STMicroelectronics STM32 microcontrollers.

The blockset supports motor control, digital power conversion, and signal processing applications, with reference examples available for each of these domains.

The blockset supports all Nucleo, discovery, evaluation, and custom boards based on STM32 processor series including High Performance (STM32H7xx, STM32H5xx, STM32F7xx, STM32F4xx, STM32F2xx), Mainstream (STM32G4xx, STM32G0xx, STM32F3xx, STM32F1xx), Ultra-Low-Power (STM32U5xx, STM32L5xx, STM32L4xx), and Wireless (STM32WBxx) families.

The blockset includes driver blocks for ADC, PWM, digital I/O, UART, Hardware interrupt, Timer, I2C, SPI, MODBUS and CAN, which you can use to configure STM32 MCU peripherals directly in your Simulink model.

Yes, the blockset supports single-click deployment, and the generated code automatically calls CMSIS-DSP for optimized signal processing and CMSIS-NN for neural network inference on Cortex-M processors (requires Embedded Coder).

Yes, you can integrate machine learning and deep learning models such as SVMs, FC layers, and LSTMs, which are particularly useful for virtual sensors in motor control applications.

Yes, you can monitor signals and tune parameters in models running on STM32 devices in real time without recompiling.

Connected I/O Simulation lets you stream peripheral data from STM32 hardware directly into Simulink during simulation, with support for ADC, PWM, GPIO, I2C, and SPI peripherals.

You can import existing STM32CubeMX project (.ioc) files or create new STM32CubeMX projects directly in Simulink, and optionally generate STM32CubeIDE-compatible projects for further development and debugging.

You can run processor-in-the-loop (PIL) tests from MATLAB and Simulink to verify numerical equivalence between your model and the generated code, and to profile code execution time on the target hardware. You can also use the execution profiler block to perform real-time execution profiling of algorithms.