Free access to source code gives developers flexibility, control, and customization. STMicroelectronics (ST) is simplifying the development of advanced, energy-efficient motor drives on STM32 microcontrollers by combining its latest STM32 PMSM FOC Software Development Kit (SDK) with the STM32Cube ecosystem (order code: X-CUBE-MCSDK).
The launch of this solution expands the opportunities for engineers to implement sophisticated drives for air conditioners, home appliances, drones, building automation, industrial machinery, medical devices, electric bicycles and many other equipment without specialized experience.
The new firmware library, version 5.0, builds on ST’s previous generation Field-Oriented Control (FOC) SDK for Permanent Magnet Synchronous Motors (PMSM), tailored to the STM32Cube Hardware Abstraction Layer (HAL) and Low Level (LL) architectures, and eases development, customization, and debugging. Free access to source code gives developers greater flexibility, control, and customization.

A new Graphical User Interface (GUI) in MC-Workbench version 5.0 leverages the STM32CubeMX workflow to set up the project, configure microcontroller peripherals, and automatically generate initialization code. Additionally, users can monitor or change control loop parameters in real time while developing or debugging a project.
This product includes a variety of algorithms implementing general-purpose PMSM control techniques such as Maximum Torque Per Ampere (MTPA) to maximize efficiency and handle a variety of load conditions. It also includes Flux-Weakening control for extended speed range and Feed-Forward control for improved stability at high speeds. It also features a ‘start-on-the-fly’ function to allow smooth drive insertion while the rotor is already turning, which is often required for outdoor fans such as air conditioners or exhaust fans.
Users can leverage proven, powerful SDK capabilities including the Motor Profiler, which helps quickly characterize most aspects of a motor by automatically detecting electrical parameters such as stator resistance (Rs), inductance (Ls), and motor voltage constant (Ke), as well as mechanical friction and inertia. A variety of flexible motor-control strategies are also supported, including current sensing using single- or triple-shunt or Isolated Current Sensors (ICS), rotor-position detection using encoders and Hall sensors, or sensorless control. The SDK further supports dual-motor applications by leveraging the rich analog features and multiple motor-control timers integrated in many STM32 variants.