STSPIN32F0 Field Oriented Control (FOC) Firmware Example

The STSW-SPIN3201 is a firmware example based on the STM32 PMSM FOC Software Development Kit (STSW-STM32100) for the STSPIN32F0.

By relying on the industry-standard Cortex®-M core, it allows the user to evaluate the STSPIN32F0 performance in applications driving a 3-phase permanent-magnet motor in field oriented control (FOC).

The STM32 PMSM FOC SDK is a part of ST's motor control ecosystem, which offers a wide range of hardware and software solutions for motor control applications.

The ST MC Workbench is PC software which reduces the design time and effort in FOC firmware library configuration. Through a graphical user interface (GUI), the user can generate all parameter header files to configure the library in accordance with application requirements, as well as monitor and change some variables of the algorithm in real-time.

Key Features

  • Based on the STM32 PMSM FOC Software Development Kit
  • Features 3-shunt current-sensing topology
  • Sensorless operation based on state observer
  • Speed and torque control
  • Native support for the STEVAL-SPIN3201 board
  • Full customization and real-time communication through the ST MC Workbench PC software
  • Firmware ANSI C, MISRA compliant


Technical Documentation

Product Specifications
Description Version Size
DB3110 DB3110: STSPIN32F0 FOC firmware example 1.0 469 KB
User Manuals
Description Version Size
UM2152 UM2152: Getting started with the STSPIN32F0 FOC firmware example STSW-SPIN3201 2.1 660 KB
UM2154 UM2154: STEVAL-SPIN3201: advanced BLDC controller with embedded STM32 MCU evaluation board 3.2 755 KB
UM2168 UM2168: Using STM32 motor control workbench with STSPIN32F0 and STSPIN32F0A 4.2 1 MB


License Agreement
Description Version Size

Tools and Software

Development Tools
Software Development Tools
Embedded Software
MCU & MPU Embedded Software
Evaluation Tools
Solution Evaluation Tools

Get Software

Part Number Software Version Marketing Status Supplier Download
STSW-SPIN3201 1.0.0 Active ST


Support & Community