logo资料库

Getting started with STM32 motor control SDK v5.0.pdf

第1页 / 共24页
第2页 / 共24页
第3页 / 共24页
第4页 / 共24页
第5页 / 共24页
第6页 / 共24页
第7页 / 共24页
第8页 / 共24页
资料共24页,剩余部分请下载后查看
1 General information
Table 1. List of acronyms
2 Motor control ecosystem setup
2.1 Software tool setup
2.2 Hardware setup
3 Getting Started
3.1 Hardware connection
3.2 Motor profiling
Figure 1. ST MC Workbench - Icon and installation folder tree
Figure 2. ST MC Workbench - GUI expanded top view
Figure 3. ST Motor Profiler - GUI
Figure 4. ST Motor Profiler - Hardware setup list examples
Figure 5. ST Motor Profiler - SM-PMSM parameters example
Figure 6. ST Motor Profiler - I-PMSM parameters example
Figure 7. ST Motor Profiler - Measurement results
Figure 8. ST Motor Profiler - Save window
3.3 MC project generation
Figure 9. ST MC Workbench - New Project window
Figure 10. ST MC Workbench - New Project Info window
Figure 11. ST MC Workbench - Project Settings
Figure 12. ST MC Workbench - Project Settings window
Figure 13. ST MC Workbench - Project generation button
Figure 14. ST MC Workbench - Workspace selection
Figure 15. ST MC Workbench - Project generation build info
3.4 Motor-control project compilation
Figure 16. IDE - MC Project view example
3.5 MC embedded application download
3.6 Spinning motor control and monitoring
Figure 17. ST MC Workbench - Motor monitoring button
Figure 18. ST MC Workbench - Motor monitoring GUI
Figure 19. ST MC Workbench - Use of the motor control and monitoring
4 Precaution of use and restrictions
Revision history
Table 2. Document revision history
UM2374 User manual Getting started with STM32 motor control SDK v5.0 Introduction STM32 microcontrollers offer the performance of the industry-standard Arm® Cortex®-M cores running either vector control (VC) or field-oriented control (FOC) modes, widely used in applications such as high-performance drives for air conditioning, home appliances, drones, building and industrial automation, medical, and e-bike. The STM32 motor control software development kit (MC SDK) is part of the STMicroelectronics motor-control ecosystem, which offers a wide range of hardware and software solutions for motor control applications. 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 • ST MC Workbench software tool, a graphical user interface for the configuration of MC SDK 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. The ST MC Workbench software tool runs on a PC. It reduces design time and effort when configuring the STM32 MC FOC FW library. Through its graphical user interface, it can generate all the configuration files needed for an application, as well as monitor and adjust some FOC algorithm variables in real time. In addition, ST MC Workbench interfaces with STM32CubeMX to take advantage of its ecosystem and customize embedded applications. March 2018 UM2374 Rev 1 1/24 www.st.com 1
Contents Contents UM2374 1 2 3 General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Motor control ecosystem setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Software tool setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1 2.2 Hardware setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Hardware connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1 3.2 Motor profiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 MC project generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.3 3.4 Motor-control project compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 MC embedded application download . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.5 3.6 Spinning motor control and monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4 Precaution of use and restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2/24 UM2374 Rev 1
UM2374 List of tables List of tables Table 1. Table 2. List of acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 UM2374 Rev 1 3/24 3
List of figures List of figures UM2374 ST MC Workbench - Icon and installation folder tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Figure 1. ST MC Workbench - GUI expanded top view. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Figure 2. ST Motor Profiler - GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Figure 3. ST Motor Profiler - Hardware setup list examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Figure 4. ST Motor Profiler - SM-PMSM parameters example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Figure 5. ST Motor Profiler - I-PMSM parameters example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Figure 6. ST Motor Profiler - Measurement results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Figure 7. ST Motor Profiler - Save window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Figure 8. Figure 9. ST MC Workbench - New Project window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Figure 10. ST MC Workbench - New Project Info window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Figure 11. ST MC Workbench - Project Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Figure 12. ST MC Workbench - Project Settings window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Figure 13. ST MC Workbench - Project generation button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Figure 14. ST MC Workbench - Workspace selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Figure 15. ST MC Workbench - Project generation build info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Figure 16. IDE - MC Project view example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Figure 17. ST MC Workbench - Motor monitoring button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Figure 18. ST MC Workbench - Motor monitoring GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Figure 19. ST MC Workbench - Use of the motor control and monitoring . . . . . . . . . . . . . . . . . . . . . . 21 4/24 UM2374 Rev 1
UM2374 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 the Arm® Cortex®-M processor. Table 1 presents the definition of acronyms that are relevant for a better understanding of this document. Acronym Table 1. List of acronyms Description GUI IDE FOC FW MC MC WB MP PMSM PWM SDK VC Graphical user interface Integrated development environment Field-oriented control Firmware Motor control Motor control Workbench (STMicroelectronics SW tool) Motor Profiler (STMicroelectronics software tool) Permanent-magnet synchronous motor Pulse-width modulation Software development kit Vector control More information about ST MC Workbench is provided in the STM32 motor control SDK v5.0 tools user manual (UM2380) available at www.st.com. UM2374 Rev 1 5/24 23
Motor control ecosystem setup UM2374 2 Motor control ecosystem setup A suitable ST Motor Control ecosystem environment includes: • • • • • A PC running the needed MC software tools A third-party IDE A third-party ANSI C-compiler A JTAG/SWD interface for debugging and programming An STMicroelectronics application board with one of the STM32 microcontrollers supported. It drives the power stage and features: – – – A three-phase PMSM motor A power supply PWM outputs to gate driver ADC channels to measure currents DC bus voltage • • Refer to the STM32 motor control software development kit (MC SDK) data brief (DB3548) at www.st.com and to the release note for more details. 2.1 Software tool setup The STMicroelectronics motor-control ecosystem runs on a PC with Windows® 7. The following PC software tools are correctly installed: • • • • ST MC Workbench (v5.0.0 or later) STM32CubeMX (v4.24.0 or later) ST-LINK/V2 (v4.0.0 or later) Any supported IDE: – – – IAR Embedded Workbench® for Arm® (v7.80.4) Keil® MDK tools (v5.24.2 or later) Ac6 System Workbench (v2.3.0 or later)(a) Refer to the respective user manuals for proper installation. STMicroelectronics documents are available from the Internet site at www.st.com: • • STM32 motor control SDK v5.0 tools user manual (UM2380) STM32CubeMX for STM32 configuration and initialization C code generation user manual (UM1718) STM32 ST-LINK utility software description user manual (UM0892) • a. The AC6 tool framework is not supported in SDK v5.0 but in later versions. 6/24 UM2374 Rev 1
UM2374 2.2 Motor control ecosystem setup Hardware setup The connection of the STMicroelectronics application board to the PC requires a USB Type- A connector. Refer to the description of the application board for details on the USB cable. A dedicated description card is delivered with each STMicroelectronics application board for proper installation. For more details, refer to the user manual of the board available at www.st.com. The selected hardware can be one of the three setups: • • • The complete MC Kit One of the complete inverter boards Any STM32 evaluation board combined with one of the ST evaluation power stages that include the MC connector UM2374 Rev 1 7/24 23
Getting Started 3 Getting Started UM2374 Note: 3.1 3.2 Warning: Check that the board is correctly configured for the motor control application and supplied with the expected input voltage. Refer to the user manual of the related hardware to setup the correct configuration, voltage range, serial communication capabilities, and programming/debugging interface. Hardware connection Connect a USB cable between the PC and the STMicroelectronics application board and the JTAG/SWD programming cable if it is different from the USB cable. Motor profiling Launch the ST MC Workbench software tool either by: • • clicking on its icon running it directly from the installation folder tree Both ways of launching the ST MC Workbench are illustrated in Figure 1. Figure 1. ST MC Workbench - Icon and installation folder tree Open the ST Motor Profiler tool either by: • • Using its dedicated button in the ST MC Workbench GUI as illustrated in Figure 2 Running it directly from the installation folder tree as illustrated in Figure 1 Figure 2. ST MC Workbench - GUI expanded top view 8/24 UM2374 Rev 1
分享到:
收藏