STM32 Ecosystem for Motor Control
From HW boards, SW tools and embedded SW to training resources and documentations, the STM32 ecosystem offers many materials to ease the development of motor control applications.
- Large STM32/STM8 (32bit/8bit) MCU portfolio, industrial grade, supporting Motor Control requirements
- Tailored digital and analog peripherals
- Large set of embedded features (present in the MC-SDK) to cope with different application needs
STM32 MCUs are particularly suitable to develop Permanent Magnet Synchronous Motors (PMSM), Brushless DC motors (BLDC), AC induction motors (ACIM), and Stepper motors., Brushless DC motors (BLDC) and Stepper motors.
STM32 MCU flagships for Motor Control applications
Development Flow
Software Tools
STM32 tools and software provide an integrated development environment to ease and support the design of motor control solutions.
ST-MC-SUITE
ST-MC-Suite is an online solution finder which offers easy access to all STM32 and STM8 MCU resources available for motor control applications, such as application notes, brochures, presentations, and magazine articles. A software wizard is included to help developers select relevant materials, add them to their bundle and download them in one click.
Part number | Description |
ST-MC-SUITE | Online Motor Control solution finder for STM32 and STM8 products |
ST MOTOR PROFILER
ST Motor Profiler is a software tool that automatically measures the electrical parameters of PMSM and BLDC motors. It can be used to run an unknown motor from scratch in only few minutes. ST Motor Profiler is included in the X-Cube-MCSDK software development kit for STM32 device.
STM32Cube & MC Workbench
STM32Cube is a free set of tools and embedded software bricks for STM32 microcontrollers and microprocessors addressing all the needs of a complete project development cycle. It includes the STM32CubeMX configuration tool which enables the generation of C initialization code for Cortex-M cores. Motor Control Workbench (available in the X-CUBE-MCSDK) is linked with STM32CubeMX. Developers can open STM32CubeMX through Motor Control Workbench during their Motor Control development to change STM32 configuration.
Part Number | Configuration | Initialization code Generation | Code Edition | Code Building | Debugging | Binary Programming | Monitoring |
STM32CubeMX | |||||||
STM32CubeIDE | (Integrates STM32CubeMX) | (Integrates STM32CubeMX) | |||||
STM32CubeProgrammer | |||||||
MC Workbench | |||||||
STM32CubeMonitor | |||||||
Motor Pilot |
STEPPER MOTORS SOLUTION
Part number | Description |
STSW-STM32018 | Driving bipolar stepper motors using STM32F103 microcontroller |
X-CUBE-SPN1 | Stepper bipolar motor driver software expansion for STM32Cube |
X-CUBE-SPN2 | Two axes stepper motor driver software expansion for STM32Cube |
X-CUBE-SPN3 | High power stepper motor driver software expansion for STM32Cube |
X-CUBE-SPN4 | Dual brush DC motor driver software expansion for STM32Cube |
X-CUBE-SPN5 | Stepper bipolar motor driver software expansion for STM32Cube |
Hardware Tools
Hardware tools to evaluate STM32 MCUs in different Motor Control environments (in terms of power range) are available. ST-MC-SUITE wizard is a useful means to select the most appropriate solution for your application.
Focus on Motor Control packs and Discovery kits
P-NUCLEO-IHM03
- This platform provides a motor-control solution for three-phase, low- voltage and low-current DC brushless or PMSM motors. It is based on the STSPIN830 driver and on the STM32G431RB MCU
- The P-NUCLEO-IHM03 STM32 motor-control pack is a kit composed of the X-NUCLEO-IHM16M1 board, the NUCLEO- G431RB board, a brushless Gimbal motor (GBM2804H-100T), and the DC power supply
B-G431B-ESC1
- Discovery kit is based on the STM32G431CB microcontroller, L6387 driver and STL180N6F7 power MOSFETs. It is composed of a main power board, and a daughterboard with embedded ST-LINK/V2-1
- It is an electronic speed controller (ESC), designed to drive a single 3-phase brushless motor (BLDC/PMSM), performing both sensorless FOC algorithm and 6-step control with a speed regulation, and an active braking function algorithm
P-NUCLEO-IHM001 and P-NUCLEO-IHM002
- This pack provides a perfect motor control solution for three-phase, low-voltage and low-current DC brushless motor. It is based on the L6230 driver (belonging to STSPIN family) and on the STM32F302R8 MCU
- The P-NUCLEO-IHM001 is a kit composed of: the X-NUCLEO- IHM07M1 board, the NUCLEO-F302R8 board and a brushless DC motor (+ power supply in P-NUCLEO-IHM002).
Products & Key Features for Motor Control
The STM32 portfolio includes devices based on Arm® Cortex®-M cores (M0, M0+, M3, M33, M4, and M7). Thanks to the MCUs' shared ecosystem, developers benefit from enhanced flexibility to move forward with their motor control design. STM8 MCUs, our 8-bit family of microcontrollers, complement our offer and enable the design of very cost-sensitive motor control solutions.
Each STM32 series offers a different set of peripherals matching different Motor Control application requirements.
STM32 Series | ARM Core | More CPU frequency | Flash range | Analog integration level | MC timer |
STM32G0xx | Cortex-M0+ | 64MHz | [16KB-512KB] | + | 1x (128MHz) |
STM32F303 | Cortex-M4 (DSP/FPU) | 72MHz | [32KB-512KB] | ++++ | 3x (144 MHz) |
STM32F302 | Cortex-M4 (DSP/FPU) | 72 MHz | [32KB-512KB] | +++ | 1x (144 MHz) |
STM32F301 | Cortex-M4 (DSP/FPU) | 72 MHz | [16KB-64KB] | ++ | 1x (144 MHz) |
STM32G431 | Cortex-M4 (DSP/FPU) | 170MHz | [32KB-128KB] | +++ | 2x (170 MHz) |
STM32G473 | Cortex-M4 (DSP/FPU) | 170 MHz | [32KB-128KB] | ++++ | 3x (170 MHz) |
STM32F4xx | Cortex-M4 (DSP/FPU) | 180MHz | [256KB-1024KB] | ++ | 2x (180 MHz) |
STM32F7xx | Cortex-M7 | 216 MHz | [64KB-2048KB] | ++ | 2x (216 MHz) |
STM32H7xx | Cortex-M7 + M4 (option) | 480 MHz | [128KB-2018KB] | ++ | 2x (240 MHz) |
STM32F0xx | Cortex-M0 | 48MHz | [16..256KB] | + | 1x 48MHz |
STM32L4xx | Cortex-M4 | 80MHz | [64..1024KB] | ++ | 2x 80MHz |
STM32H5xx | Cortex-M33 (DSP/FPU) | 250MHz | [128..2048KB] | + | 2x (250MHz) |
STM32C0xx | Cortex-M0+ | 48MHz | [16..256KB] | + | 1x 48MHz |
STM32 F3 series and G4 series
The STM32G4 series combines a 32-bit Arm® Cortex®-M4 core (with FPU and DSP instructions) running at 170 MHz combined with three different hardware accelerators, rich analog peripherals and advanced motor control timers to meet all motor control application requirements. These product series are ideal for Motor Control applications.
STSPIN32F0
The STSPIN32F0 is a System-In-Package providing an integrated solution suitable for driving three-phase BLDC motors using different driving modes. This product series combines an STM32F031 microcontroller with triple half-bridge gate driver able to drive power MOSFETs or IGBTs with a current capability of 600 mA (sink and source) as well as other analog components.
MOTOR CONTROL LIBRARY PERFORMANCE (PART OF THE X-CUBE-MCSDK)
- Test configuration 1:
- HW boards based on STM32 Nucleo (as control board) + X-NUCLEO-IHM16M1 (as LV-LP power board)
- Running ‘legacy’ STO/PLL sensorless solution
- PWM frequency = 20kHz - FOC = 10KHz
- Speed regulation (MediumFrequencyTask): 1KHz
- Compiler STM CubeIDE (option -Ofast)
MCU | CPU Clock (MHz) | Cortex | Current | Prefetch | I+D Cache | CCM-RAM or ITCM-RAM | Total | FOC lib Code |
G071RB | 64 | M0+ | 3 Shunt |
|
|
| 37% | 27 |
1 Shunt |
| 47% | 28 | |||||
F303RE | 72 | M4 | 3 Shunt |
| 18% | 19 | ||
1 Shunt |
| 35% | 18 | |||||
F446RE | 180 | M4 | 3 Shunt |
| 11% | 24 | ||
1 Shunt |
| 15% | 24 | |||||
G431RB | 170 | M4 | 3 Shunt |
| 9% | 20 | ||
1 Shunt |
| 12% | 19 | |||||
H745ZI | 240 | M4 (2nd core) | 3 Shunt |
|
| 5% | 24 | |
F746ZG | 216 | M7 | 3 Shunt | 6% | 19 | |||
1 Shunt | 7% | 20 | ||||||
C031RB | 48 | M0+ | 3 Shunt |
|
| 51% | 23 | |
3 Shunt |
| 49% | 23 | |||||
H503RB | 250 | M33 | 3 Shunt |
| 8% | 25 | ||
1 Shunt |
| 11% | 25 |
- Test configuration 2:
- HW boards based on B-G473E-ZeSTS1 (as control board) + STEVAL-LVLP01 (as LV-LP power board)
- Running HSO sensorless solution
- PWM frequency = 10kHz
- Speed regulation (MediumFrequencyTask): 1KHz
- Compiler IAR (option - HighSpeed)
MCU | CPU Clock (MHz) | Cortex | Current | Prefetch | I+D Cache | CCM-RAM | Total | FOC lib Code |
G473QE | 170 | M4 | 3 Shunt |
|
|
| 28% | 35 |
40 (with profiler) |
Default configuration generated from MCSDK Workbench
In post MCSDK Workbench generation, to improve executions time, by using CubeMx change default options in System Core categories or by using CCMRAM in F3 & G4 cases
PRODUCT KEY FEATURES TO ENABLE MOTOR CONTROL
The Motor Control Library included in X-CUBE-MCSDK (today available for PMSM/BLDC motors) enables the features listed below.
Full Integration/configuration in MC Workbench tools:
Key features | STM32 series compatibility | |
Current Sensing and over current protection OCP | Current 1-shunt or 3-shunt | F0 - F3 - F4 - F7 - L4 - G0 - G4 - H7 - C0 - H5 STSpin32F0/G4 |
Insulated Current Sensing (ICS) | G4 - STSpin32G4 | |
Embedded Comparators OCP, OPAMPs | F3 - G4 | |
Speed & Position sensing | Sensor (Hall, Encoder), Sensor-less | F0 - F3 - F4 - F7 - L4 - G0 - G4 - H7 - C0 - H5 STSpin32F0/G4 |
Bus voltage sensing/protection (UVP and OVP) | Vbus reading, Under and Over voltage protection | F0 - F3 - F4 - F7 - L4 - G0 - G4 - H7 - C0 - H5 STSpin32F0/G4 |
Temperature sensing/protection (OTP) | Temperature measurement, Over Temperature Protection | F0 - F3 - F4 - F7 - L4 - G0 - G4 - H7 - C0 - H5 STSpin32F0/G4 |
Field Oriented Control (FOC) | Single | F0 - F3 - F4 - F7 - L4 - G0 - G4 - H7 - C0 - H5 STSpin32F0/G4 |
Dual (Couple ADCs per motor) | F3 - F4 - G4 | |
Dual (Sharing ADCs) resources for both motors | F3 - F4 - G4 | |
Six Step | Full support | F0 - F3 - G0 - G4 - STSpin32F0/G4 |
ACIM | Configured through WB, Example only | G4 |
Control Mode | Torque/Speed or Position control | F0 - F3 - F4 - F7 - L4 - G0 - G4 - H7 - C0 - H5 STSpin32F0/G4 |
Sensor-less Mode | STO/PLL, STO/Cordic (Luenberger) | F0 - F3 - F4 - F7 - L4 - G0 - G4 - H7 - C0 - H5 STSpin32F0/G4 |
HSO (High Speed Observer) | G4 | |
Other Features | MTPA, Flux weaken, Feed Forward | F0 - F3 - F4 - F7 - L4 - G0 - G4 - H7 - C0 - H5 STSpin32F0/G4 |
PCF - FW support | Not yet supported | |
Discontinuous PWM | F0 - F3 - F4 - F7 - L4 - G0 - G4 - H7 - C0 - H5 STSpin32F0/G4 | |
Over Modulation and Single shunt phase shift | F0 - F3 - F4 - F7 - L4 - G0 - G4 - H7 - C0 - H5 STSpin32F0/G4 | |
Monitor control pilot - MC Protocol v2 | High bandwidth 1.84mbd | |
IOC reading capability | F0 - F3 - F4 - F7 - L4 - G0 - G4 - H7 - C0 - H5 STSpin32F0/G4 |
Resources
Getting started with STM32 Motor control SDK6.0
The new MC-SDK v6.0.0 offers a completely renewed GUI (Motor Control Workbench V2), fully supporting FOC and 6-Step control, to enhance developers autonomy and support more features and products in the future.
Getting starting with P-NUCLEO-IHM03
The P-NUCLEO-IHM03 STM32 motor-control pack is a kit composed of the X-NUCLEO-IHM16M1 board, the NUCLEO-G431RB board, a brushless Gimbal motor (GBM2804H-100T), and the DC power supply.
STM32G4 series - Product overview
The STM32G4 Series combines a 32-bit Arm® Cortex®-M4 core (with FPU and DSP instructions) ru nning at 170 MHz combined with 3 different hardware accelerators: ART Accelerator™, CCM-SRAM routine booster and mathematical accelerators.
Motor Control MOOC
STM32 online training courses in MOOC format to help you design with ST products, software and tools.
Get involved in the STM32 Community
Ask questions, share projects and collaborate with your fellow community members.