0% found this document useful (0 votes)
153 views84 pages

Um2380 stm32 Motor Control SDK v54 Tools Stmicroelectronics

Uploaded by

Andy L
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views84 pages

Um2380 stm32 Motor Control SDK v54 Tools Stmicroelectronics

Uploaded by

Andy L
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 84

UM2380

User manual
STM32 motor control SDK v5.4 tools

Introduction
The STM32 motor control software development kit (MC SDK) is part of the
STMicroelectronics motor-control ecosystem. It is referenced as X-CUBE-MCSDK or
X-CUBE-MCSDK-FUL according to the software license agreement applied. It includes the:
• ST MC FOC firmware library for permanent-magnet synchronous motor (PMSM) field-
oriented control (FOC)
• ST MC Workbench software tool, a graphical user interface for the configuration of the MC
FOC firmware library parameters, including the ST Motor Profiler tool (MP)
The STM32 motor control software development kit allows evaluation of the performance of
STM32 microcontrollers in applications driving single or dual three-phase permanent-
magnet synchronous motors within the STM32 ecosystem.
This user manual details the use of the software tools in STM32 motor control software
development kit.

June 2019 UM2380 Rev 4 1/84


www.st.com 1
Contents UM2380

Contents

1 General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Reference documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2 ST Motor Profiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1 Launching the ST Motor Profiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Hardware setup configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3 Hardware setup connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4 Motor profiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.5 Profiled motor saving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.6 Motor spinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.7 Closing the ST Motor Profiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3 The ST Motor Control Workbench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19


3.1 Creating a new project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2 Loading an existing project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.3 Icons and Menu area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.3.1 File menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.3.2 Tools menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.3.3 Help menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.3.4 Documentation menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.4 Configuring a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.4.1 Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.4.2 Power stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.4.3 Drive management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.4.4 Control stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.5 Main hardware settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
3.6 User information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.7 Motor monitoring and spinning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
3.7.1 Communication link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.7.2 Motor control dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
3.7.3 Motor control buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
3.7.4 Status overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

2/84 UM2380 Rev 4


UM2380 Contents

4 Precautions of use and restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

5 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

UM2380 Rev 4 3/84


3
List of tables UM2380

List of tables

Table 1. List of acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7


Table 2. ST Motor Profiler - Troubleshot message examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Table 3. ST MC Workbench – Menu icons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Table 4. ST MC Workbench - Communication link GUI commands . . . . . . . . . . . . . . . . . . . . . . . . . 73
Table 5. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

4/84 UM2380 Rev 4


UM2380 List of figures

List of figures

Figure 1. ST Motor Profiler - Icon and location in the start program list. . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 2. ST MC Workbench - GUI expanded top view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 3. ST Motor Profiler - Startup GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 4. ST Motor Profiler - Hardware setup list examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 5. ST Motor Profiler - SM-PMSM parameters example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Figure 6. ST Motor Profiler - I-PMSM parameters example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Figure 7. ST Motor Profiler - Configured GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 8. ST Motor Profiler - Download status window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 9. ST Motor Profiler - Connected GUI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 10. ST Motor Profiler - Profiled motor GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 11. ST Motor Profiler - Save window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 12. ST Motor Profiler - Spin control window (Start). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 13. ST Motor Profiler - Spin control window (Stop). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 14. ST Motor Profiler - Tool closure confirmation window . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 15. ST MC Workbench - Icon and location in the start program list . . . . . . . . . . . . . . . . . . . . . 19
Figure 16. ST MC Workbench - GUI (Launch window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Figure 17. ST MC Workbench - New Project window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Figure 18. ST MC Workbench - New Project Info window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Figure 19. ST MC Workbench - Hardware configuration window (global view) . . . . . . . . . . . . . . . . . . 24
Figure 20. ST MC Workbench - File menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Figure 21. ST MC Workbench - Project saving confirmation window . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 22. ST MC Workbench - Project Save As window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 23. ST MC Workbench - Project Properties window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 24. ST MC Workbench - Recent project list confirmation window . . . . . . . . . . . . . . . . . . . . . . 28
Figure 25. ST MC Workbench - Project deleting confirmation window . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 26. ST MC Workbench - Tools menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 27. ST MC Workbench - Pin Assignment window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 28. ST MC Workbench - Pin Assignment check window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 29. ST MC Workbench - Pin Assignment reset window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 30. ST MC Workbench - Information window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 31. ST MC Workbench - Script progress window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 32. ST MC Workbench - User information sheet example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 33. ST MC Workbench - Monitor window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Figure 34. ST MC Workbench - User information sheet cleared . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Figure 35. ST MC Workbench - User information log file example . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Figure 36. ST MC Workbench - Help menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 37. ST MC Workbench - About window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 38. ST MC Workbench - Documentation menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 39. ST MC Workbench - Motor window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Figure 40. ST MC Workbench - Motor parameter GUI (Surface Mounted PMSM) . . . . . . . . . . . . . . . 36
Figure 41. ST MC Workbench - Motor parameter GUI (Internal PMSM) . . . . . . . . . . . . . . . . . . . . . . . 37
Figure 42. ST MC Workbench - Sensor parameter GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Figure 43. ST MC Workbench - Save motor parameter window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Figure 44. ST MC Workbench - Power Stage window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Figure 45. ST MC Workbench - AC Input Info GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Figure 46. ST MC Workbench - Rated Bus Voltage Info GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Figure 47. ST MC Workbench - Bus Voltage Sensing GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Figure 48. ST MC Workbench - Temperature Sensing GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

UM2380 Rev 4 5/84


6
List of figures UM2380

Figure 49. ST MC Workbench - Current Sensing GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44


Figure 50. ST MC Workbench - Amplifying Network Gain Calculator GUI . . . . . . . . . . . . . . . . . . . . . 45
Figure 51. ST MC Workbench - Over Current Protection GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Figure 52. ST MC Workbench - Power drivers GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Figure 53. ST MC Workbench - Power Switches GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Figure 54. ST MC Workbench - Dissipative Brake GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Figure 55. ST MC Workbench - Inrush Current Limiter GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Figure 56. ST MC Workbench - Power Factor Correction GUI (Hardware Settings) . . . . . . . . . . . . . . 49
Figure 57. ST MC Workbench - Power Factor Correction GUI (PFC Parameters) . . . . . . . . . . . . . . . 50
Figure 58. ST MC Workbench - Drive Management window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Figure 59. ST MC Workbench – Speed/Position Feedback Management GUI
(Sensor-less using Luenberger observer + PLL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Figure 60. ST MC Workbench – Speed/Position Feedback Management GUI
(Sensor-less using Luenberger observer + Cordic) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Figure 61. ST MC Workbench – Speed/Position Feedback Management GUI
(Quadrature encoder) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Figure 62. ST MC Workbench – Speed/Position Feedback Management GUI
(Hall sensors) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Figure 63. ST MC Workbench – Auxiliary sensor(-less) GUI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Figure 64. ST MC Workbench – Drive Settings GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Figure 65. ST MC Workbench – Sensing and Firmware Protection GUI . . . . . . . . . . . . . . . . . . . . . . . 58
Figure 66. ST MC Workbench – Start-Up Parameters GUI (Basic Rev-Up) . . . . . . . . . . . . . . . . . . . . 59
Figure 67. ST MC Workbench – Start-Up Parameters GUI (Basic On-the-Fly) . . . . . . . . . . . . . . . . . . 60
Figure 68. ST MC Workbench – Start-Up Parameters GUI (Advanced Rev-Up). . . . . . . . . . . . . . . . . 61
Figure 69. ST MC Workbench – Start-Up Parameters GUI (Advanced On-the-Fly) . . . . . . . . . . . . . . 62
Figure 70. ST MC Workbench – Additional Features and PFC settings GUI. . . . . . . . . . . . . . . . . . . . 63
Figure 71. ST MC Workbench - FreeRTOS GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Figure 72. ST MC Workbench - Control Stage window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Figure 73. ST MC Workbench – MCU and Clock Frequency GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Figure 74. ST MC Workbench – Analog Input and Protection GUI (Phase current feedback) . . . . . . 65
Figure 75. ST MC Workbench – Analog Input and Protection GUI
(Bus voltage feedback) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Figure 76. ST MC Workbench – Analog Input and Protection GUI
(Temperature feedback) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Figure 77. ST MC Workbench – Analog Input and Protection GUI
(PFC stage feedback) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Figure 78. ST MC Workbench – DAC functionality GUI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Figure 79. ST MC Workbench – Digital I/O GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Figure 80. ST MC Workbench – User Interface Add-on GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Figure 81. ST MC Workbench - Main hardware setting area. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Figure 82. ST MC Workbench - User information area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Figure 83. ST MC Workbench - Monitor and spin control GUI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Figure 84. ST MC Workbench - Plotting window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Figure 85. ST MC Workbench - Basic dashboard view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Figure 86. ST MC Workbench - Advanced dashboard view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Figure 87. ST MC Workbench - Expert dashboard register view. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Figure 88. ST MC Workbench - Communication link icons
in expert dashboard register view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Figure 89. ST MC Workbench - Import registers configuration window. . . . . . . . . . . . . . . . . . . . . . . . 78
Figure 90. ST MC Workbench - Expert dashboard configuration view . . . . . . . . . . . . . . . . . . . . . . . . 78
Figure 91. ST MC Workbench - Motor remote control button view . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Figure 92. ST MC Workbench - Motor status view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

6/84 UM2380 Rev 4


UM2380 General information

1 General information

The MC SDK is used for the development of motor-control applications running on STM32
32-bit microcontrollers based on Arm®(a) Cortex® processor(s).
The ST MC workbench software tool provides an easy way to configure motor control
application software matching hardware setup. The projects generated from this basis are
compatible with the use of STM32CubeMX for further extension or modification of the
application.
ST MC Workbench runs on a Windows® 7/10-based PC system equipped with a USB
Type- A connector for connecting to the application board.
Refer to the STM32 MC SDK release note for all information about possible use of the ST
MC Workbench software tool.
Note: ST MC Workbench provides contextual information tips when the cursor goes over
parameters in the GUI window.1

1.1 Definitions
Table 1 lists the acronyms that are relevant for a better understanding of this document.

Table 1. List of acronyms


Acronym Description

GUI Graphical user interface


IDE Integrated development environment
FOC Field-oriented control
FW Firmware
MC Motor control
MC WB Motor control Workbench (STMicroelectronics software tool)
MP Motor Profiler (STMicroelectronics software tool)
OCP Over-current protection
PFC Power factor correction
PMSM Permanent-magnet synchronous motor
PWM Pulse-width modulation
SDK Software development kit

a. Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere.

UM2380 Rev 4 7/84


83
General information UM2380

1.2 Reference documents


Arm® documents
The following documents are available from the http://infocenter.arm.com web page:
• Cortex®-M0 Technical Reference Manual
• Cortex®-M3 Technical Reference Manual
• Cortex®-M4 Technical Reference Manual

STMicroelectronics documents
The following documents are available from the www.st.com web page:
• STM32F0 Series product data sheets
• STM32F1 Series product data sheets
• STM32F3 Series product data sheets
• STM32F4 Series product data sheets
• STM32F7 Series product data sheets
• STM32L4 Series product data sheets
• STM32G0 Series product data sheets
• STM32G4 Series product data sheets
• X-NUCLEO-IHM expansion boards FOR motor control - Selection guide on-line
presentation

8/84 UM2380 Rev 4


UM2380 ST Motor Profiler

2 ST Motor Profiler

The ST Motor Profiler software tool is used to identify the motor’s main PMSM
characteristics, which are further transferred to the ST MC Workbench.

2.1 Launching the ST Motor Profiler


Launch the ST MC Workbench software tool either:
• by clicking on its icon, or
• by running it directly from the installation folder tree
Both ways of launching the ST MC Workbench are illustrated in Figure 1.

Figure 1. ST Motor Profiler - Icon and location in the start program list

Open the ST Motor Profiler tool either by:


• using its dedicated button in the ST MC Workbench GUI, as illustrated in Figure 2, or
• running it directly from the installation folder tree, as illustrated in Figure 1.

Figure 2. ST MC Workbench - GUI expanded top view

UM2380 Rev 4 9/84


83
ST Motor Profiler UM2380

A GUI window is displayed by the ST Motor Profiler, as shown in Figure 3.

Figure 3. ST Motor Profiler - Startup GUI

2.2 Hardware setup configuration


Click on the Select Boards button (as shown in Figure 3) to display the list of supported
boards, as illustrated in Figure 4. Select the used application board within this list.
Note: The ST Motor Profiler tool can be used only with ST hardware in the list of supported
setups.

10/84 UM2380 Rev 4


UM2380 ST Motor Profiler

Figure 4. ST Motor Profiler - Hardware setup list examples

Click on the STMicroelectronics hardware setup to select it and configure the ST Motor
Profiler tool.
As an example, Figure 4 shows the selection of the P-NUCLEO-IHM001 motor control
Nucleo Pack with NUCLEO-F302R8 and X-NUCLEO-IHM07M1.
After hardware setup selection, fill in the parameter fields with the motor information:
• The number of pole pairs (mandatory field)
• The Max Speed (optional field)
By default, the ST Motor Profiler tool searches for the maximum allowed speed
matching the motor and the hardware setup used.
• The Max Current allowed by the motor (optional field)
By default, it is the maximum peak current deliverable by the hardware setup.
• The nominal DC bus voltage used by the hardware setup (optional field)
By default, it is the power supply stage, either the bus voltage for low voltage
applications (DC voltage), or the RMS value for high voltage applications (AC voltage).
• The magnetic built-in type (mandatory field)
By default, the SM-PMSM is selected.
• The Ld / Lq ratio (mandatory field) only when I-PMSM built-in is selected (as shown in
Figure 6)

UM2380 Rev 4 11/84


83
ST Motor Profiler UM2380

Figure 5 gives example values for the BR2804-1700KV-1 motor provided with the
P-NUCLEO-IHM001 hardware setup.

Figure 5. ST Motor Profiler - SM-PMSM parameters example

Figure 6. ST Motor Profiler - I-PMSM parameters example

12/84 UM2380 Rev 4


UM2380 ST Motor Profiler

2.3 Hardware setup connection


Once the ST Motor Profiler is configured, click on the Connect button, as shown in Figure 7.

Figure 7. ST Motor Profiler - Configured GUI

Once the connection is requested, a status widows is displayed, as shown in Figure 8. Its
content depends on the hardware setup history.

Figure 8. ST Motor Profiler - Download status window

UM2380 Rev 4 13/84


83
ST Motor Profiler UM2380

If a problem is encountered, a troubleshot message window (among those listed in Table 2)


is displayed to support recovery actions.

Table 2. ST Motor Profiler - Troubleshot message examples


Message
Information content Action needed
type

Depending on the status window:


– If the programming procedure cannot be
executed, check the JTAG/SWD
programming cable.
Error
– If the programming procedure is executed
but the Motor Profiler cannot communicate
with the board, check the serial
communication connections.

When the board is new or has been erased,


the motor profiler FW is automatically loaded
Warning into the microcontroller by pressing the
Upgrade Firmware button to confirm proper
FW upload.

Acknowledge and return to the selection of the


Warning
boards used in the hardware setup.

In case of over- or under-voltage detection,


Faults correct the bus voltage setting and its proper
connection to the power board.

14/84 UM2380 Rev 4


UM2380 ST Motor Profiler

Once the connection is successful, the Start Profile button is proposed in the GUI (see
Figure 9).

Figure 9. ST Motor Profiler - Connected GUI

UM2380 Rev 4 15/84


83
ST Motor Profiler UM2380

2.4 Motor profiling


Click on the Start Profile button proposed in the GUI as indicated in Figure 9 to start motor
profiling.
The profiling first identifies the electrical parameters, and then the mechanical ones. In case
of over-current fault detection, the profiling is restarted with a reduced current.
When the profiling is successfully completed, all the motor measurements are shown in
green or orange (depending on their relative accuracy), as illustrated in Figure 10. When
one or more results are displayed in red, check the hardware setup and restart the motor
profiling sequence.

Figure 10. ST Motor Profiler - Profiled motor GUI

2.5 Profiled motor saving


Click on the Save button (refer to Figure 10) to store the motor measurements for later use
with the ST MC Workbench software tool. Figure 11 shows the menu displayed in that case:
• Enter the name of the profiled motor, such as BR2804-1700KV-1
• Provide details about the profiled motor, such as 3-phase motor with 7 pole-pairs under
12 Vdc
• Eventually add details on the hardware setup used

16/84 UM2380 Rev 4


UM2380 ST Motor Profiler

Figure 11. ST Motor Profiler - Save window

2.6 Motor spinning


Click on the Play button (refer to Figure 10) to spin the profiled motor.
Figure 12 shows the sequence of operations to operate the motor through the spin control
window:
1. Preset the maximum acceleration
2. Click on the Start button to activate motor control
3. Adjust the Speed [RPM] slider with the cursor

Figure 12. ST Motor Profiler - Spin control window (Start)

UM2380 Rev 4 17/84


83
ST Motor Profiler UM2380

Figure 13 shows the two additional steps to stop the motor properly through the spin control
window:
4. Click on the Stop button to stop activating motor control
5. Click on the Done button

Figure 13. ST Motor Profiler - Spin control window (Stop)

2.7 Closing the ST Motor Profiler


Click on the Disconnect button (refer to Figure 10) to release the connection properly and
close the ST Motor Profiler window by means of its upper-right icon. A confirmation window
is displayed (see Figure 14).

Figure 14. ST Motor Profiler - Tool closure confirmation window

If the motor parameters have not been saved yet and need to be, proceed as follows:
1. Select the No button in the confirmation window
2. Click on the Connect button, as shown in Figure 7
3. Save the motor parameters, as detailed in Section 2.5
Clicking on the Yes button closes the ST Motor Profiler software tool, unsaved motor
parameters being lost.

18/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

3 The ST Motor Control Workbench

Launch the ST MC Workbench software tool either by clicking on its icon, or running it
directly from the installation folder tree, as shown in Figure 15.

Figure 15. ST MC Workbench - Icon and location in the start program list

The ST MC Workbench GUI features three different areas (numbered boxes in Figure 16):
1. User-buttons: used to start a new project, to load a previous one, or to launch the ST
Motor Profiler software tool
2. Recent Project: used to load a recent project
3. Example Projects: used to load a project example

UM2380 Rev 4 19/84


83
The ST Motor Control Workbench UM2380

Figure 16. ST MC Workbench - GUI (Launch window)

20/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

3.1 Creating a new project


Clicking on the New Project button (see Figure 16) displays the New Project window (see
Figure 17) used for the definition of the hardware setup information through steps 1 to 4:
1. Select the Application Type
2. Check the Single Motor or the Dual Motors check box
3. Select the ST hardware setup boards:
– If the ST board is a complete inverter board (single board with both power and
control electronics), select the Inverter combo box and select the Inverter choice
from the drop-down list
– If an ST MC Kit such as P-NUCLEO-IHM001 is used, select the MC Kit combo box
and select the Kit choice from the drop-down list
– If the system is composed of a control evaluation board associated with a power
evaluation board, select the Power & Control box and select the Control board and
the Power board from the drop-down lists
4. Select the profiled motor from the drop-down list
5. Click on the OK button to import all needed hardware settings

UM2380 Rev 4 21/84


83
The ST Motor Control Workbench UM2380

Figure 17. ST MC Workbench - New Project window

The created project imports the hardware settings according to the selected boards and
motor profiling results. It also imports other settings like the PWM frequency and the startup
acceleration used during motor profiling.

22/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

After a few seconds, a New Project Info window is displayed where the motor operating
conditions can be checked, as shown in Figure 18.

Figure 18. ST MC Workbench - New Project Info window

Clicking on the OK button opens the same GUI (as if loading an existing project), as detailed
in Section 3.2.

3.2 Loading an existing project


Clicking on the Load Project button (see Figure 16) displays the hardware configuration
window used for the tuning of hardware setup information, shown in Figure 19:
• Icons and Menu: used for the control of all project settings such as project workspace
directory, used IDE, and others
• Hardware details setting buttons: used to fine tune the functionalities of the selected
hardware, such as motor parameters or sensor use
• Main hardware settings: view of the main parameters at a glance
• User information: feedback about user actions on project settings. As an example, it
can inform the user that a new project has been created, but not yet saved
• Hardware setup information: informs the user about overall hardware part settings

UM2380 Rev 4 23/84


83
The ST Motor Control Workbench UM2380

Figure 19. ST MC Workbench - Hardware configuration window (global view)

The following sections provide detailed informations about the areas shown in Figure 19:
• Section 3.3: Icons and Menu area
• Section 3.4: Configuring a project
• Section 3.5: Main hardware settings
• Section 3.6: User information

3.3 Icons and Menu area


The Icons and Menu area is used for the control of project settings through several menus,
described in this section:
• File menu on page 26
• Tools menu on page 28
• Help menu on page 33
• Documentation menu on page 34
Shortcuts exist through usage of icon buttons, as summarized in Table 3.

24/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Table 3. ST MC Workbench – Menu icons


Function Icon Description

Create a new project Create a new project, as shown in Figure 17

Load an existing project Load and open an existing project, as shown in Figure 19

Save the current project Save the current project settings

Clear the log Clear the user information sheet, as shown in Figure 34

Check the pin assignment of the MCU as well as the pins left available, as
Pins assignment
shown in Figure 27

Generate or Open the GUI to Generate or to Update the MC application project files for
Update the project the selected IDE, as shown in Figure 33

Open Monitor Monitor and spin the motor, as shown in Figure 33

Help Open the on-line help file

About Check the ST MC Workbench software tool version, as shown in Figure 37

UM2380 Rev 4 25/84


83
The ST Motor Control Workbench UM2380

3.3.1 File menu


Figure 20 shows the File menu of the hardware configuration window.

Figure 20. ST MC Workbench - File menu

This menu allows the user to:


• Create a new project, as shown in Figure 17
• Open an existing project, as shown in Figure 19
• Close the current project.
If the project is not saved yet, a confirmation window is displayed asking for one of
three possible answers, as shown in Figure 21:
– Yes: the current project is saved
– No: the current project is not saved and its settings are lost
– Cancel: returns to the hardware configuration window shown in Figure 19
• Save the current project settings.
If the project is not saved yet, a file manager window is displayed asking to save the
current project settings as a new project, as shown in Figure 22
• Save the project settings as a new project.
A file manager window is displayed asking to save the current project settings as a new
project, as shown in Figure 22
• View the project properties.
A window is displayed with some project informations, as shown in Figure 23
• Load an existing project from the recent-project list.
If the current project is not saved yet, a confirmation window is displayed asking to
delete it from the recent project list, as shown in Figure 24
• Delete the recent project list, after user confirmation, as shown in Figure 25
• Exit from the hardware configuration window.
If the project is not saved yet, a confirmation window is displayed asking for one of
three possible answers, as shown in Figure 21:
– Yes: the current project is saved
– No: the current project is not saved and its settings are lost
– Cancel: returns to the hardware configuration window shown in Figure 19

26/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 21. ST MC Workbench - Project saving confirmation window

Figure 22. ST MC Workbench - Project Save As window

Figure 23. ST MC Workbench - Project Properties window

UM2380 Rev 4 27/84


83
The ST Motor Control Workbench UM2380

Figure 24. ST MC Workbench - Recent project list confirmation window

Figure 25. ST MC Workbench - Project deleting confirmation window

3.3.2 Tools menu


Figure 26 shows the Tools menu of the hardware configuration window.

Figure 26. ST MC Workbench - Tools menu

28/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

This menu allows the user to:


• Check the pin assignment of the MCU as well as the pins left available, as shown in
Figure 27:
– Click on the Check button to control the coherency of the pin assignment. A
reporting window is displayed, see Figure 28. Use the OK button to close it.
– Click on the Reset button to restore the default pin assignment of the
STMicroelectronics board. A confirmation window is displayed, see Figure 29.
Click on the Yes or No button to confirm or invalidate the action.
– Close the window (upper-right click) to cancel the pin assignment action.
• Generate the MC application project files for the selected IDE:
– If the current project is not saved yet, a file manager window is displayed asking to
save the current project settings as a new project, as shown in Figure 22.
Canceling this action, displays an information window indicating that the project
needs to be saved before generating any files. Use the OK button to close it, as
shown in Figure 30.
– If the current project is saved, a project settings window is displayed to select the
STM32CubeMx version usage (if several ones are installed) and to select the IDE
toolchain (note that HAL/LL driver selection is not used in this current MC
Workbench version).
– Click on the Generate button to create the *.ioc file; or click on the Update button
to update only the MC firmware configuration inside an existing *.ioc file (i.e. useful
to keep additional modifications from the STM32CubeMX usage). Note that any
physical hardware modification linked to motor control (e.g. MC pin assignment) is
not taking into account using this Update button, this means that the MC project
have to generate again in that case.
– Then, the Generation tab is activated to inform about the used version
configuration, and to show the IDE toolchain generation log (see Figure 31) while
the user information sheet is updated (see Figure 32). When completed, the user
has to manually close the progression window.
• Monitor and spin the motor, as shown in Figure 33. Refer to Section 3.7 for details.
• Clear the user information sheet, as shown in Figure 34.
• Export the user information sheet in a log file in text format and open it in a text editor,
as shown in Figure 35.
• Show user information messages when necessary.

UM2380 Rev 4 29/84


83
The ST Motor Control Workbench UM2380

Figure 27. ST MC Workbench - Pin Assignment window

Figure 28. ST MC Workbench - Pin Assignment check window

Figure 29. ST MC Workbench - Pin Assignment reset window

30/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 30. ST MC Workbench - Information window

Figure 31. ST MC Workbench - Script progress window

Figure 32. ST MC Workbench - User information sheet example

UM2380 Rev 4 31/84


83
The ST Motor Control Workbench UM2380

Figure 33. ST MC Workbench - Monitor window

Figure 34. ST MC Workbench - User information sheet cleared

Figure 35. ST MC Workbench - User information log file example

32/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

3.3.3 Help menu


Figure 36 shows the Help menu of the hardware configuration window.

Figure 36. ST MC Workbench - Help menu

This menu allows the user to:


• Have easy access to this user manual
• Check the ST MC Workbench software tool version.
Select the About… menu to prompt the software tool version window, and click on the
OK button to quit this window, as shown in Figure 37.
• Gain direct access to the ST community website

Figure 37. ST MC Workbench - About window

UM2380 Rev 4 33/84


83
The ST Motor Control Workbench UM2380

3.3.4 Documentation menu


Figure 38 shows the Documentation menu of the hardware configuration window.

Figure 38. ST MC Workbench - Documentation menu

This menu allows the user to:


• Direct access to the ST MC SDK webpage
• Have access to the STM32 MC SDK documents in pdf format
• Open the on-line STM32 MC Firmware Reference document
• Read the STM32 MC SDK package Release Note

3.4 Configuring a project


Depending on MC application software needs, MC FOC firmware is set according to the
hardware part used. The following functionalities are detailed in this section:
• Motor on page 34
• Power stage on page 39
• Drive management on page 50
• Control stage on page 63

3.4.1 Motor
Figure 39 shows the Motor window used for motor configuration. The user has to click on
the motor or on the sensor to pop-up the GUI for parameter settings:
• the motor parameter GUI is shown in Figure 40
• the sensors GUI is shown in Figure 42

34/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 39. ST MC Workbench - Motor window

The PMSM motor parameters are imported from the ST Motor Profiler tool (refer to
Section 2) or entered manually, as shown in Figure 40.

UM2380 Rev 4 35/84


83
The ST Motor Control Workbench UM2380

Figure 40. ST MC Workbench - Motor parameter GUI (Surface Mounted PMSM)

36/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 41. ST MC Workbench - Motor parameter GUI (Internal PMSM)

UM2380 Rev 4 37/84


83
The ST Motor Control Workbench UM2380

The selection of the sensors used (all selection configuration are allowed) and the setting of
sensor parameters is illustrated in Figure 42.

Figure 42. ST MC Workbench - Sensor parameter GUI

Click on the Save parameters buttons (refer to Figure 40 and Figure 42) to reuse the
parameters in a following new project. The save motor parameter window asks for a name
and a short description of the set parameter, as shown Figure 43.

38/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 43. ST MC Workbench - Save motor parameter window

3.4.2 Power stage


Figure 44 shows the Power Stage window used for power stage configuration through
several GUIs for parameter settings:
• AC voltage input information (refer to Figure 45)
• DC bus voltage input (refer to Figure 46), and sensing information (when supported;
refer to Figure 47)
• Temperature sensing use (when supported; refer to Figure 48)
• Current sensing use (refer to Figure 49 and Figure 50)
• Over-current protection setup (when supported; refer to Figure 51)
• Power drivers setup (x3; refer to Figure 52)
• Power switches setup (x6; refer to Figure 53)
• Brake use (when supported; refer to Figure 54)
• Inrush Current Limiter feature (when supported; refer to Figure 55)
• Power Factor Correction feature (when supported; refer to Figure 56)

UM2380 Rev 4 39/84


83
The ST Motor Control Workbench UM2380

Figure 44. ST MC Workbench - Power Stage window

40/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 45 shows the AC Input Info GUI where the user applies the pre-defined AC voltage
range or customizes it according to the hardware setup. In addition, an input over-voltage
protection is set by default to the maximum AC voltage. To modify it, uncheck the box and
enter the desired threshold value.

Figure 45. ST MC Workbench - AC Input Info GUI

Figure 46 shows the Rated Bus Voltage Info GUI where the user configures the DC bus
voltage input range (minimum and maximum rated values), as well as the nominal voltage.

Figure 46. ST MC Workbench - Rated Bus Voltage Info GUI

UM2380 Rev 4 41/84


83
The ST Motor Control Workbench UM2380

The sensing implementation topology and related values can then be defined, as shown in
Figure 47. The inverse value of the DC bus voltage divider is automatically computed.

Figure 47. ST MC Workbench - Bus Voltage Sensing GUI

42/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 48 shows the Temperature Sensing GUI where the user configures the temperature
sensing range as a function of the hardware setup. In addition, an input over-temperature
protection is set by default to the maximum working temperature. To modify it, uncheck the
box and enter the desired threshold value. The hysteresis value can be updated as well by
the user.

Figure 48. ST MC Workbench - Temperature Sensing GUI

UM2380 Rev 4 43/84


83
The ST Motor Control Workbench UM2380

Figure 49 shows the Current Sensing GUI where the user selects the current sensing
topology, and defines the conditioning method. Clicking on the Calculate button displays the
Current Sensing Gain Calculator GUI, which is useful for setting the amplifying network gain
value.

Figure 49. ST MC Workbench - Current Sensing GUI

Figure 50 shows the Amplifying Network Gain Calculator GUI where the user configures the
sensing implementation topology and related values.

44/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 50. ST MC Workbench - Amplifying Network Gain Calculator GUI

Note: All the needed firmware values are automatically computed.


Click on the Export button to save the configuration and generate an HTML page with the
implementation and the computation reported. Click on the Confirm button to save the
configuration. Click on the Cancel button to invalidate the modification. Both buttons close
the window.
Figure 51 shows the Over Current Protection GUI, where the user configures the external
over-current protection comparator settings. It illustrates the selection of the trigger input
signal polarity from the related drop-down box. This value is also known as the over-current
feedback signal polarity.
Depending on MC application software needs, the user can decide to use an output pin to
disable this external OCP mechanism. In this case, the Over-current protection disabling
network checkbox must be checked and the active signal polarity set.
If the internal comparator is used, refer to Control stage.

UM2380 Rev 4 45/84


83
The ST Motor Control Workbench UM2380

Figure 51. ST MC Workbench - Over Current Protection GUI

46/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 52 shows the Power drivers GUI where the user parameterizes each power driver
(one per motor phase) with its high- and low-side values.

Figure 52. ST MC Workbench - Power drivers GUI

Note: The user can easily force the same settings for all three power drivers by ticking the “Force
same values for U, V, W Driver” checkbox.
When the low-side driver is not hardware driven and complemented from the high side, the
HW inserted dead-time definition is useless. Otherwise, the dead-time must reflect the
implemented hardware electrical characteristics.
Select the Share signal enable checkbox to save the two other remaining Low side driver
enabling pins (refer to Control stage).
Figure 53 shows the Power Switches GUI where the user configures the six power switches
according to their electrical characteristics.

Figure 53. ST MC Workbench - Power Switches GUI

UM2380 Rev 4 47/84


83
The ST Motor Control Workbench UM2380

Figure 54 shows the Dissipative Brake GUI where the user selects the active signal polarity
used for the braking usage.

Figure 54. ST MC Workbench - Dissipative Brake GUI

Figure 55 shows the Inrush Current Limiter GUI where the user selects the active signal
polarity used for the Inrush Current Limiter. This GUI offers the possibility to configure the
activation startup if needed.

Figure 55. ST MC Workbench - Inrush Current Limiter GUI

48/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 56 shows the Power Factor Correction GUI where the user reflects hardware settings
and defines the PFC firmware parameters.

Figure 56. ST MC Workbench - Power Factor Correction GUI (Hardware Settings)

UM2380 Rev 4 49/84


83
The ST Motor Control Workbench UM2380

Figure 57. ST MC Workbench - Power Factor Correction GUI (PFC Parameters)

3.4.3 Drive management


Figure 58 shows the Drive Management areas used for the configuration. Clicking on the
Firmware Drive Management box gives access to the configuration of:
• Speed/Position Feedback Management
• Drive Settings
• Sensing Enabling and Firmware Protections
• Start-up Parameters
• Additional Features and PFC settings
• FreeRTOS usage

50/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 58. ST MC Workbench - Drive Management window

The following figures detail the Speed/Position Feedback Management GUI, where the user
selects and configures the sensor(-less) as the main one, and eventually the auxiliary as
another one, measuring the motor speed or position.
• Through the Sensor-less (Luenberger observer + PLL) selection (Figure 59), user
configures the sensor-less estimator. User may also customize the Luenberger
observer and the PLL PI filters.
• Through the Sensor-less (Luenberger observer + Cordic) selection (Figure 60), user
configures the sensor-less estimator. User may also customize the Luenberger
observer PI filter.
• Through the Quadrature encoder selection (Figure 61), user parametrizes the sensor
usage. User choses the counter direction.
• Through the Hall sensors selection (Figure 62), user parametrizes the sensor usage.
• Through the Auxiliary sensor tab, user selects and configures a second sensor(-less),
measuring the motor speed or position. To avoid mistakes, user can select only the
supported but remaining sensor(-less) when enabled (Figure 63).

UM2380 Rev 4 51/84


83
The ST Motor Control Workbench UM2380

Figure 59. ST MC Workbench – Speed/Position Feedback Management GUI


(Sensor-less using Luenberger observer + PLL)

52/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 60. ST MC Workbench – Speed/Position Feedback Management GUI


(Sensor-less using Luenberger observer + Cordic)

UM2380 Rev 4 53/84


83
The ST Motor Control Workbench UM2380

Figure 61. ST MC Workbench – Speed/Position Feedback Management GUI


(Quadrature encoder)

54/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 62. ST MC Workbench – Speed/Position Feedback Management GUI


(Hall sensors)

UM2380 Rev 4 55/84


83
The ST Motor Control Workbench UM2380

Figure 63. ST MC Workbench – Auxiliary sensor(-less) GUI

56/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 64 shows the Drive Settings GUI, where the user configures the PWM generation,
the Speed or the Torque regulator, the Flux regulator and the default control settings.

Figure 64. ST MC Workbench – Drive Settings GUI

The PWM frequency is used to drive the power switches, while the PWM idle state for High
and Low sides are usually Turn-Off (area 1).
The Speed or the Torque regulator (areas 2 and 4) configures the algorithm execution rate
(or Medium Frequency Task) linked with the Systick frequency usage. It is also the place
where user may customize the Speed or the Torque PI filters.
User selects the default control mode (Speed or Torque) and its parameters in area 3.
The flux regulator (area 4) configures the motor flux control execution rate (or High
Frequency Task) linked with the number of PWM periods. User may also customize this PI
filter.

UM2380 Rev 4 57/84


83
The ST Motor Control Workbench UM2380

Figure 65 shows the Sensing and Firmware Protection GUI where the user configures the
DC Bus voltage protection mechanism. From this interface the user can recall the other
protection mechanism GUI, Temperature and AC Input voltage.

Figure 65. ST MC Workbench – Sensing and Firmware Protection GUI

The following figures show the Start-Up Parameters GUI, where the user customizes the
motor ramp-up phase during a start-up sequence. User chooses between normal Rev-Up or
On-the-Fly start-up, and between Basic or Advanced profiles.
• Through the Basic Rev-Up phase (Figure 66), user defines the motor speed ramp and
its current consumption during that timeframe. When enabled, he also defines the
transition duration between the open-loop and the close-loop.
• Through the Basic On-The-Fly phase (Figure 67), user defines the motor speed ramp
and its current consumption during that timeframe. Then, he also provides the speed
detection duration for the estimator convergence before testing the loop closure.
• Through the Advanced Rev-Up phase (Figure 68), user defines up to five ramps for the
motor speed and its current consumption during a provided duration. Then, user
choses the first ramp to start from. When enabled, he also defines the transition
duration between the open-loop and the close-loop.
• Through the Advanced On-The-Fly phase (Figure 69), user defines up to three ramps
for the motor speed and its current consumption during a provided duration. Then, user
also provides the speed detection duration for the estimator convergence before
testing the loop closure.
During this ramp-up phase, the loop is tested as a closed one when the estimated speed
range is within the provided variance (band tolerance). It is based from a minimum output
speed. User defines the number of consecutive passed tests to consider the loop as closed.

58/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 66. ST MC Workbench – Start-Up Parameters GUI (Basic Rev-Up)

UM2380 Rev 4 59/84


83
The ST Motor Control Workbench UM2380

Figure 67. ST MC Workbench – Start-Up Parameters GUI (Basic On-the-Fly)

60/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 68. ST MC Workbench – Start-Up Parameters GUI (Advanced Rev-Up)

UM2380 Rev 4 61/84


83
The ST Motor Control Workbench UM2380

Figure 69. ST MC Workbench – Start-Up Parameters GUI (Advanced On-the-Fly)

62/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 70 shows the Additional Features and PFC settings GUI, where the user selects the
additional features usable for its motor control.
Note that when the Flux Weakening feature is selected, user parametrizes the PI filter, as
well as the upper limit of the voltage to apply.
The Inrush Current Limiter button is popping-up the GUI shown in Figure 55.

Figure 70. ST MC Workbench – Additional Features and PFC settings GUI

Figure 71 shows the FreeRTOS GUI, where the user enables and configures, Timer and IT
usage supporting the OS, for its motor control application.

Figure 71. ST MC Workbench - FreeRTOS GUI

3.4.4 Control stage


Figure 72 shows the Control Stage window used for the configuration of:
• MCU and clock frequency
• Analog input and protection
• DAC functionality
• Digital I/O
• User interface

UM2380 Rev 4 63/84


83
The ST Motor Control Workbench UM2380

Figure 72. ST MC Workbench - Control Stage window

Figure 73 shows the MCU and Clock Frequency GUI, where the user selects the MCU
used, as well as its clocking information.

Figure 73. ST MC Workbench – MCU and Clock Frequency GUI

Figure 74 shows the Analog Input and Protection GUI, where the user selects the MCU pin
assignments and configures the analog input parameters.

64/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 74. ST MC Workbench – Analog Input and Protection GUI (Phase current feedback)

Through the Phase current feedback tab, the user


• Configures and selects the ADC for the motor current acquisition, as well as its pins
usage (area 1). Note that the GUI reflects either the 1- or the 3-shunt topology
selected.
• Configures the current sensing topology
– internal (Embedded PGA), area 2: user selects and sets the MCU Op-Amp usage
as well as the pin assignments, and defines the overall network gain (thanks to the
Calculate button that pops-up the GUI shown in Figure 50).
– external (operational amplifier) to the MCU
• Configures the over-current protection topology:
– no protection
– internal (embedded HW OCP), area 3: user sets the MCU comparator usage as
well as the pin assignment
– external to the MCU (only the Digital filter duration is required)

UM2380 Rev 4 65/84


83
The ST Motor Control Workbench UM2380

Through the Bus voltage feedback tab (Figure 75), user selects and configures the ADC for
the DC bus voltage acquisition as well as its input pin usage.
A click on the Bus Voltage Partitioning button pops-up the GUI shown in Figure 47.

Figure 75. ST MC Workbench – Analog Input and Protection GUI


(Bus voltage feedback)

66/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Through the Temperature feedback tab (Figure 76), user selects and configures the ADC for
the temperature image acquisition (usually an NTC resistor) as well as its input pin usage.

Figure 76. ST MC Workbench – Analog Input and Protection GUI


(Temperature feedback)

UM2380 Rev 4 67/84


83
The ST Motor Control Workbench UM2380

Through the PFC stage feedback tab (Figure 77), user selects and configures the ADC for
the PFC current sensing and the AC voltage sensing, as well as their input pins usage.

Figure 77. ST MC Workbench – Analog Input and Protection GUI


(PFC stage feedback)

68/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 78 shows the DAC functionality GUI, where the user selects the DAC channel used
for debug (if any) and the data to output.

Figure 78. ST MC Workbench – DAC functionality GUI

Figure 79 shows the Digital I/O GUI, where the user configures the Timers used to
• control the power switches
• control the PFC driver
• configure the serial communication link for the UART
• interface the Encoder or the Hall sensors for the speed/position acquisition
• configure the Inrush Current Limiter.

Figure 79. ST MC Workbench – Digital I/O GUI

Figure 80 shows the User Interface Add-on GUI, where the user configures the interface for
the control board usage: LCD (if supported), a Start/Stop push-button, and/or the serial
communication link with software application.

UM2380 Rev 4 69/84


83
The ST Motor Control Workbench UM2380

Figure 80. ST MC Workbench – User Interface Add-on GUI

3.5 Main hardware settings


At a first glance, the user can view the main hardware settings reflecting all the main
parameters as follows:
• PWM frequency used
• Main sensor usage selected
• Auxiliary sensor usage selected when the hardware setup supports it
• Torque and flux execution rate: it is the number of PWM periods executed during only
one complete FOC algorithm execution
• Bus voltage sensing enabled/disabled
• Over-voltage detection enabled/disabled
• Under-voltage detection enabled/disabled
• Temperature sensing enabled/disabled
• Current reading topology selection

70/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

The hardware setting area is shown in Figure 81.

Figure 81. ST MC Workbench - Main hardware setting area

Double clicking on any of the parameters in the Motor column directly displays the full
configuration GUI (refer to Section 3.4).
Note: This sheet is not configurable.

3.6 User information


A user information sheet provides feedback about user's action:
• The Info / Errors / Warnings tab reflects the project settings or MC controls performed
and the resulting outcomes. This tab can only be cleaned
• The Change Log tab reflects the hardware setting modifications done
The user information area is shown in Figure 82.

Figure 82. ST MC Workbench - User information area

UM2380 Rev 4 71/84


83
The ST Motor Control Workbench UM2380

3.7 Motor monitoring and spinning


Caution: By default, ST MC FOC firmware embeds the needed code to dialog with the ST MC
Workbench software tool. This section only applies if this code is embedded in the motor
control application software.
Figure 83 shows the monitor and spin control GUI, which a user can use to observe and
modify some MC parameters and to fine tune its MC application software through several
areas:
• Communication link area: used to setup the connection with the board, connect to the
board, or disconnect from the board. It is also used for reading, writing or plotting data,
as well as for closing the GUI
• Dashboard area: the adaptive dashboard area reflects the user experience in several
ways:
– Basic
– Advanced
– Expert (register and configuration tabs)
• Motor Control buttons area: used to command the hardware setup
• Status overview area: used to monitor hardware setup at a glance

Figure 83. ST MC Workbench - Monitor and spin control GUI

72/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

3.7.1 Communication link


The communication link area (refer to Figure 83) features several functions, listed in
Table 4.

Table 4. ST MC Workbench - Communication link GUI commands


Function Icon or field Detail

Selects the communication port used from the drop-down box.


Configure the
communication link
Selects the communication speed from the drop-down box.

Connects to the board.

Connect or disconnect

Disconnects from the board

Forces the reading of data.

Read and/or write data


from/to MC application Suspends the periodic data writing and reading.
software

Resumes the periodic data writing and reading.

Displays the plotting window with the speed measured and the
Plot speed data
speed reference, as shown in Figure 84.

Close the monitor and


Exits the GUI.
spin control GUI

UM2380 Rev 4 73/84


83
The ST Motor Control Workbench UM2380

Figure 84 shows the plotting window with an example illustrating the measured speed vs.
the reference.
Figure 84. ST MC Workbench - Plotting window

74/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

3.7.2 Motor control dashboard


The motor control dashboard provides a set of views that can be selected as a function of
the user’s experience:
• Basic view (refer to Figure 85)
• Advanced view (refer to Figure 86)
• Expert views (refer to Figure 87 and Figure 90)
Figure 85 shows the basic dashboard, where the user can:
• monitor the bus voltage, motor speed, and power component heat-sink
• modify the final ramp speed value, which may also be used to control motor speed
during spinning

Figure 85. ST MC Workbench - Basic dashboard view

UM2380 Rev 4 75/84


83
The ST Motor Control Workbench UM2380

Figure 86 shows the dashboard where the advanced user can:


• Configure (drop-down boxes) control modes an monitor (blue fields) a few firmware
variables for debugging purpose using only the DAC
• Monitor (blue fields) and define (white fields) some current controller parameters
• Tune the speed controller (white fields) through variables
• Configure (white fields) the sensor-less observers: PLL and Cordic
• Tune (white fields) and monitor (blue fields) the flux weakening feature

Figure 86. ST MC Workbench - Advanced dashboard view

76/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

Figure 87 shows the dashboard where the expert user can:


• Read/Write (white field) or read only (blue fields) the content of 102 registers matching
corresponding variables in MC FOC firmware

Figure 87. ST MC Workbench - Expert dashboard register view

When using the expert dashboard register view, the user has access to the additional icons
shown in Figure 88:
• The first additional icon is used to import a configuration from another ST MC
Workbench project through the import register configuration window shown in
Figure 89
• The second additional icon is used to set the registers value to default ones
These icons are available only when the periodic write and read of registers has been
suspended, or before the connection to the board.

Figure 88. ST MC Workbench - Communication link icons


in expert dashboard register view

Note: These buttons do not exist in other dashboard views.

UM2380 Rev 4 77/84


83
The ST Motor Control Workbench UM2380

Figure 89. ST MC Workbench - Import registers configuration window

Figure 90 shows the dashboard where the expert user can:


• Import (button) the configuration from the current ST MC Workbench project
• Customize (check boxes and white fields) the monitor view accordingly to the MC
application software
• Update (white fields) the startup configuration used with the motor. This is also known
as rev-up.

Figure 90. ST MC Workbench - Expert dashboard configuration view

78/84 UM2380 Rev 4


UM2380 The ST Motor Control Workbench

3.7.3 Motor control buttons


The motor control button area is shown in Figure 91. It is useful for motor control with
remote commands such as:
• Start-up the motor when in idle state.
• Stop the motor when in start or run state.
• Stop a ramp during its execution request.
It does not stop the motor itself, but the execution of the defined ramp at the current on-
going speed or torque value.
• Acknowledge a motor failure.
May be used only after fault correction to prevent security issues.
• Align with the encoder used.
• Enable or disable PFC usage when the hardware setup supports it.
• Acknowledge a PFC failure when the hardware setup supports it.

Figure 91. ST MC Workbench - Motor remote control button view

UM2380 Rev 4 79/84


83
The ST Motor Control Workbench UM2380

3.7.4 Status overview


The status overview, illustrated in Figure 92, provides information on:
• the motor state machine
• the detected motor failure
• the measured motor speed.

Figure 92. ST MC Workbench - Motor status view

80/84 UM2380 Rev 4


UM2380 Precautions of use and restrictions

4 Precautions of use and restrictions

The motor profiling algorithm is intended for rapid evaluation of the ST MC solution. It can
be used to drive any three-phase PMSM without any specific instrument or special skill.
Although the performed measurements are not as precise as with a proper instrumentation,
ST Motor Profiler measurements are optimized (green color in Figure 10) when:
• the stator resistance is greater than 1 Ω
• the stator inductance is greater than 1 mH
It is important to choose the appropriate HW according to the characteristics of the motor.
For instance, the maximum current should match the maximum current of the board as
closely as possible.
The ST Motor Profiler can be used only with compatible STMicroelectronics evaluation
boards.

Warning: Use the ST Motor Profiler tool to refer to the list of supported
systems.

UM2380 Rev 4 81/84


83
Revision history UM2380

5 Revision history

Table 5. Document revision history


Date Revision Changes

20-Mar-2018 1 Initial release.


Updated document title to refer to software version 5.1.
Updated Section 3.3: Icons and Menu area, Tools menu,
Documentation menu, Power stage, Control stage and Section 3.4:
Configuring a project.
Minor text edits across the whole document.
Updated Figure 15: ST MC Workbench - Icon and location in the
start program list, Figure 18: ST MC Workbench - New Project Info
02-Jul-2018 2 window, Figure 27: ST MC Workbench - Pin Assignment window,
Figure 31: ST MC Workbench - Script progress window, Figure 33:
ST MC Workbench - Monitor window, Figure 37: ST MC Workbench
- About window, Figure 38: ST MC Workbench - Documentation
menu and Figure 44: ST MC Workbench - Power Stage window.
Updated caption of Figure 1: ST Motor Profiler - Icon and location in
the start program list.
Removed former Figure 32: ST MC Workbench - Update .ioc file
error window.

82/84 UM2380 Rev 4


UM2380 Revision history

Table 5. Document revision history


Date Revision Changes

Updated document title to refer to software version 5.2.


Updated Section 3.2: Loading an existing project, Section 3.4.1:
Motor, Section 3.4.3: Drive management and Section 3.4.4: Control
stage.
Updated Figure 15: ST MC Workbench - Icon and location in the
31-Aug-2018 3 start program list, Figure 19: ST MC Workbench - Hardware
configuration window (global view), Figure 23: ST MC Workbench -
Project Properties window, Figure 37: ST MC Workbench - About
window, Figure 44: ST MC Workbench - Power Stage window,
Figure 58: ST MC Workbench - Drive Management window and
Figure 72: ST MC Workbench - Control Stage window.
Updated:
– SDK version in the title of document, Section 1: General
information, STMicroelectronics documents, Section 3.3.2: Tools
menu, Section 3.3.3: Help menu, Section 3.3.4: Documentation
menu
– Figure 1: ST Motor Profiler - Icon and location in the start program
list; Figure 15: ST MC Workbench - Icon and location in the start
program list; Figure 20: ST MC Workbench - File menu, Figure 26:
ST MC Workbench - Tools menu, Figure 30: ST MC Workbench -
Information window, Figure 31: ST MC Workbench - Script
progress window, Figure 36: ST MC Workbench - Help menu,
Figure 37: ST MC Workbench - About window, Figure 38: ST MC
26-Jun-2019 4 Workbench - Documentation menu, Figure 40: ST MC Workbench
- Motor parameter GUI (Surface Mounted PMSM), Figure 42: ST
MC Workbench - Sensor parameter GUI, Figure 49: ST MC
Workbench - Current Sensing GUI, Figure 51: ST MC Workbench
- Over Current Protection GUI, Figure 54: ST MC Workbench -
Dissipative Brake GUI
Added: Figure 41: ST MC Workbench - Motor parameter GUI
(Internal PMSM)
Removed figure33. ST Workbench - Project Settings option window
Added Figure 40: ST MC Workbench - Motor parameter GUI
(Surface Mounted PMSM), Figure 57: ST MC Workbench - Power
Factor Correction GUI (PFC Parameters), Figure 71: ST MC
Workbench - FreeRTOS GUI

UM2380 Rev 4 83/84


83
UM2380

IMPORTANT NOTICE – PLEASE READ CAREFULLY

STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and
improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on
ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order
acknowledgement.

Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or
the design of Purchasers’ products.

No license, express or implied, to any intellectual property right is granted by ST herein.

Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.

ST and the ST logo are trademarks of ST. For additional information about ST trademarks, please refer to www.st.com/trademarks. All other
product or service names are the property of their respective owners.

Information in this document supersedes and replaces information previously supplied in any prior versions of this document.

© 2019 STMicroelectronics – All rights reserved

84/84 UM2380 Rev 4

You might also like