dmBot Techical Forum

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 8008|回复: 1

X-CUBE-MCSDK-FUL 5.4.1 & 5.33版本分享 ST电机库

[复制链接]

67

主题

148

帖子

4万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
42664
发表于 2020-2-25 10:28:44 | 显示全部楼层 |阅读模式
ST电机库
X-CUBE-MCSDK-FUL 5.3.3 版本
连接如下:链接:https://pan.baidu.com/s/11okXq-3x0ecBs-oxBVxT4A
提取码:ys4v

X-CUBE-MCSDK-FUL 5.4.1 版本
连接如下链接:https://pan.baidu.com/s/14O8v0bPSTpsTolDbGljgUg   
提取码:uvuf

Release Notes for ST Motor Profiler
Copyright © 2018 STMicroelectronics
The ST Motor Profiler software tool provides the following features:
  • A PC software application to auto-measure electromechanical parameters of PMSM motors ;
  • Embedded One Touch Tuning algorithm: a new algorithm that uses a single parameter to set up the speed controller according to the type of load. Together with the ST Motor Profiler software tool, it can be enabled to achieve the setup and run unknown motor from scratch
  • Measured motor parameters can be configured in the MC application, thanks to ST Motor Control Workbench.
Update HistoryV1.1.2 / 06-Jul-2018Main Changes
  • Added support for the STEVAL-ESC001V1 ESC F3 board.
V1.1.1 / 05-Jun-2018Main Changes
  • Added support for the STEVAL-IHM016 board.

Release Notes for X-Cube-MCSDK
Copyright © 2019 STMicroelectronics
The STM32Cube is a STMicroelectronics original initiative to ease developers’ life by reducing development efforts, time and cost.
The STM32Cube covers STM32 portfolio.
The STM32 microcontroller offers the performance of the industry-standard Cortex®-M core running either Vector Control or either Field Oriented Control (FOC) modes, widely used in high-performance motor drive for Air Conditioning, Home Appliances, Drones, Building & Industrial Automation, Medical and E-bike applications.
The STM32 Motor Control (MC) Software Development Kit (SDK) includes:
  • ST MC FOC FW library;
  • ST MC Workbench software tool.

The ST MC FOC FW library implements the FOC mode for driving both Internal and Surface Mounted Permanent Magnets Synchronous Motor (PMSM). This implementation can drive one or two motors simultaneously with the listed characteristics and features.
Please, note that some of these features are not supported on all MCUs. In other words, the possible combinations of features and MCUs are discussed below.
Click here to check the supported STM32 microcontrollers and there for the known limitations.
Please, visit us at http://www.st.com to download latest available documents and any update.
The ST MC FOC FW library provides the following features:
Motor Drive
  • Driving one or two different motors simultaneously

    • In dual motors configuration, any combination of the below-mentioned speed feedback, current sampling, control mode, optional algorithm are allowed
  • Speed or Torque Control Mode:

    • Control Mode can be switched at any time (even when motor is spinning);
    • Control Mode is set independently for each motor.
  • Programmable Speed or Torque ramps:

    • Ramp duration;
    • Final target speed or torque.

FOC Loop
  • SVPWM generation:

    • Configurable PWM frequency;
    • Centered or Edge PWM pattern type.
  • Open or Closed Loop operation

    • Closed loop is default; However, it is possible to remain in open loop when needed.
  • Flux Weakening algorithm to reach higher than rated motor speed (optional)
  • Feed Forward high performance current regulation algorithm (optional)
  • Maximum Torque Per Ampere (I-PMSM only, optional)
  • Rev-Up control for sensor less configuration
  • On-The-Fly startup The sensor less algorithm is able to detect if the motor is already spinning before startup, thus skipping the acceleration phase if needed (useful for fan application)
  • Real time tuning of:

    • PI/PID regulators;
    • Sensor less algorithms (Observers, Rev-up procedure);
    • Optional algorithms (Feed Forward, Flux Weakening, MTPA…);
    • Sensor less startup procedure.

Current Sensing
  • Isolated Current Sensing (ICS);
  • Single Shunt resistor current sensing - common DC-link shunt resistor (ST patented);
  • Three Shunt resistors current sensing - resistors placed on the bottom of the three inverter legs;
  • In case of dual motors drive setup, current sensing methods can differ from one motor to the other. Then, optimization is possible to share ADCs usage between motors.
Rotor Speed & Position Sensing
  • Support for embedded Operational Amplifiers usage on STM32 microcontroller when exists;
  • Sensor less Back EMF State Observer coupled with a PLL for rotor speed and angle computation (estimation);
  • Sensor less B-EMF State Observer coupled with a CORDIC for rotor speed and angle computation (estimation);
  • 60° or 120° displaced HALL sensors decoding (measurement);
  • Quadrature Encoder decoding (measurement);
  • Two of these above methods can be used simultaneously on any of the motors: Main and Auxiliary one. The Main is used in the control loop, while the other is Auxiliary. Swapping Main with Auxiliary motor are allowed during spinning.
Motor Brake strategies
  • Dissipative DC link brake resistor handling;
  • Motor phases short-circuiting (with optional hardware over-current protection disabling);
  • Motor phases free-wheeling.
Usage of STM32F30x embedded analog peripherals
  • Support for Programmable Gain Amplifiers (PGA) usage for current sensing:

    • three-shunts and single shunt topologies;
    • internal or external gain;
  • Support for comparators usage in Over-Current Protection (OCP) mode:

    • three-shunts and single shunt topologies;
    • internal or external threshold;
  • Support for comparators usage in Over-Voltage Protection (OVP) mode:

    • motor phases short-circuiting mode and free-wheeling mode;
    • internal or external threshold.

Usage of FOC specific STM32F30x hardware accelerations
  • ADC queue of context (ST patented architecture);
  • CCM (core coupled memory) RAM;
  • Advanced Timer structures for single shunt topology (ST patented).
Fault Management
  • Over-Current;
  • Over-Voltage
  • Under-Voltage;
  • Over-Heating;
  • Speed feedback reliability error;
  • FOC algorithm execution overrun.
ST Motor Profiler software tool (delivered with ST MC Workbench tool)
  • A PC software application to auto-measure electromechanical parameters of PMSM motors (STM32F30x and STM32F4xx only);
  • Embedded One Touch Tuning algorithm is a new algorithm that uses a single parameter to set up the speed controller according to the type of load. Together with the ST Motor Profiler software tool, it can be enabled to achieve the setup and run unknown motor from scratch (STM32F30x and STM32F4xx only);
  • Measured motor parameters can be configured in the MC application, thanks to ST Motor Control Workbench.
ST Motor Control Workbench software tool
  • Graphical User Interface (GUI) to configure a Motor Control application:

    • Features & Algorithms are configured graphically;
    • Boards are configured from provided ST database: Control board, Power Board, motor parameters;
    • Custom power board and motor can be specified;
    • Generates .ioc file to interface STM32CubeMX PC software tool.
  • Easy parameters tuning:

    • PMSM FOC Library;
    • MCU board;
    • Power board;
    • Motor.

STM32CubeMx
STM32CubeMx is a PC software tool provided by ST to configure STM32 based applications. It is not part of the STM32 MC SDK delivery, but can be downloaded freely at http://www.st.com.
It is used to generate IAR Embedded Workbench for ARM(IAR Systems AB) or μVision® IDE for Arm® (Keil® MDK) ready to use projects from .ioc files that the ST MC Workbench produces.
In the ST MC context, the STM32CubeMX might be used to customize pinsimplementation of the MC application as well as to configure other peripheralsthat are not MC specific but nonetheless needed for the MC application (e.g.GPIO pins).
Supported devices and boards
  • Supported Devices:

    • STM32F0xx Family: STM32F030RC / STM32F030R8 / STM32F031C6 / STM32F051R8 / STM32F051C8 / STM32F072VB / STM32F072RB
    • STSPIN32 Family: STSPIN32F0601 / STSPIN32F0602 / STSPIN32F0251 / STSPIN32F0252
    • STM32F1xx Family: STM32F103 High, Medium and Low Densities
    • STM32F3xx Family: STM32F302VB / STM32F302VC / STM32F302R8 / STM32F303VB / STM32F303VC / STM32F303ZE / STM32F303VE / STM32F303RE
    • STM32F4xx Family: STM32F417IG / STM32F415ZG / STM32F407IG / STM32F446ZE / STM32F446RE / STM32F401RE
    • STM32F7xx Family: STM32F746ZG / STM32F769NI
    • STM32L4xx Family: STM32L452RE / STM32L476RG
    • STM32G0xx Family: STM32G081
    • STM32G4xx Family: STM32G431CB / STM32G431RB / STM32G474QE
  • Control Boards

    • STM32F0xxFamily:

      • NUCLEO-F030R8
      • NUCLEO-F072RB
      • STM32072B-EVAL
    • STM32F1xx Family :

      • NUCLEO-F103RB
      • STM3210E-Eval
    • STM32F3xx Family:

      • NUCLEO-F302R8
      • NUCLEO-F303RE
      • STM32303E-EVAL
    • STM32F4xx Family:

      • NUCLEO-F446RE
      • NUCLEO-F401RE
      • STM3240G-EVAL
      • STM3241G-EVAL
      • STM32446E-EVAL
      • STEVAL-IHM039V1
    • STM32F7xx Family:

      • NUCLEO-F746ZG
      • STM32F769I-EVAL
    • STM32L4xx Family:

      • NUCLEO-L452RE
      • NUCLEO-L476RG
      • STM32L476G-EVAL
    • STM32G0xx Family:

      • STM32G081B-EVAL
    • STM32G4xx Family:

      • NUCLEO-G431RB
      • STM32G474E-EVAL

  • Power Boards:

    • STEVAL-IHM023V3
    • STEVAL-IHM025V1
    • STEVAL-IHM028V2
    • STEVAL-IHM045V1
    • STEVAL-IPM05F
    • STEVAL-IPM07F
    • STEVAL-IPM08B
    • STEVAL-IPM10B
    • STEVAL-IPM10F
    • STEVAL-IPM15B
    • STEVAL-IPMNG3Q
    • STEVAL-IPMNG3S
    • STEVAL-IPMNG5Q
    • STEVAL-IPMNG8Q
    • STEVAL-IPMNM1N
    • STEVAL-IPMNM2N
    • STEVAL-IPMNM1S
    • STEVAL-CTM009V1
    • X-NUCLEO-IHM07M1
    • X-NUCLEO-IHM08M1
    • X-NUCLEO-IHM11M1
    • X-NUCLEO-IHM16M1
  • Inverter Boards

    • STEVAL-IHM034V2 (STM32F1)
    • STEVAL-IHM042V1
    • STEVAL-SPIN3201
    • STEVAL-SPIN3202
    • X-NUCLEO-IHM16 + NUCLEO-F303RE bundle
    • STEVAL-ESC001V1
    • B-G431B-ESC1
    • STSPIN32F0601S1
    • EVSPIN32F0601S3
    • EVSPIN32F0251S1
    • EVSPIN32F0602S1

Known Limitations
  • The MC SDK installer, the ST Motor Profiler and the ST Motor Control Workbench software tools are running only on a PC system, and have been tested using a Windows 7 Operating System.
  • LCD screen on EVAL boards are not supported;
  • Ac6 System Workbench for STM32 (SW4STM32) toolchain is not supported;
  • IP initialization with LL libraries is not supported for the STM32F1 family
  • With Keil MDK-ARM toolchain, using an STM32F3 MCU, packs STM32F3xx_DFP version 2.0.0 and 2.0.1 are not supported by CubeMx. Version 1.4.0 of the pack is the last version known to work well.
  • With STM32CubeMx 4.24.0: During the generation of F303x based projects, CubeMx pops-up an error window but the generated project is actually OK. This issue is fixed on version 4.25.0 of STM32CubeMx.
  • With STM32CubeMx 4.26.0: Projects generated for Atollic TrueSTUDIO do not have the correct optimization level. Optimization level is set to "None (-O0)" although it should be "Optimize for Speed (-Ofast)". This needs to be changed manually, in TrueSTUDIO, Project's Build Settings, Tool Settings, C Compiler, Optimization.
  • With STM32CubeMx 5.0.0:

    • Projects generated for all supported toolchains do not have the correct optimization level if they are generated from the graphical user interface of STM32CubeMx. Projects directly generated from the Motor Control Workbench do not suffer from this issue
    • Motor Control Projects configurations using an STM32L4 device do not work if generated using the LL drivers. Using the HAL ones is OK.
    • Motor Control Projects configurations using an STM32L4 device fail to generate if ADC discontinuous mode is set while scan mode is disabled. This is typically the case for projects using ICS as the current sensing technology.
    • Motor Control Projects using either an STM32F4 or an STM32F7 device and created with an older version of STM32CubeMx fail to load in STM32CubeMx version 5.0.0. A workaround consists in re-generating the projects from the Workbench (using the Generate button and not the Update one).
  • With STM32CubeMx 5.0.1:

    • Motor Control Projects configurations using an STM32L4 with ICS as current sensing topology do not work.
  • With STM32CubeMx 5.2.0:

    • Configurations based on STM32G4xxx using a Single-Shunt current sensing topology and initializing the peripherals with the LL drivers cannot be generated.
    • Generating ADC initialization with the LL drivers on STM32G4xxx or STM32L4xxx based configurations results in a non working code.
    • Generating TIMers initializations with the LL drivers on STM32G4xxx based configurations results in a non working code.
  • Projects generated by STM32 Motor Control Workbench for STM32CubeIDE do not build.


Update HistoryV5.4.1 / 28-June-2019Main Changes
  • Added support for the following STSPIN MCUs: STSPIN32F0601 / STSPIN32F0602 / STSPIN32F0251 / STSPIN32F0252
  • Added support for the following STSPIN and boards:

    • STSPIN32F0601S1
    • EVSPIN32F0601S3
    • EVSPIN32F0251S1
    • EVSPIN32F0602S1
  • Added support for Dual drive configurations on the STM32G4 family.
  • Added support for STM32G4, STM32F7, STM32F4 , STM32L4 based boards into Motor Profiler

  • The following issues have been fixed:

    • Incorrect polarization value of phase A for 3-Shunt configurations on STM32F0 and STM32G0 MCUs.
    • First ADC conversion for measuring the polarization of the current measurement was wrong on STM32F1/F3/F4/F7/G4/L4 series.
    • Overflow in speed control if the speed unit is set to _001HZ
    • ICL was not working
    • Motor Profiler was not working on STM32F3 and L4 in one ADC configuration
    • handling of the PWM_FREQUENCY_SCALING parameter was incorrect in some cases
    • ESC Example failed to build
    • wrong motor power computation when stopping the motor.
    • The divisor of the derivative coefficient of PIDs could not be set because a prototype of the function that sets it was missing in the header file.

Profiling motors with ST Motor Profiler
When using the Motor Profiler the user must make sure that the motor is fully stopped (spinning at 0 RPM) before starting it again whatever the method (by clicking on Play, Start Profile, ...).
After a fault occurred, or before starting the motor, the low side switches are activated in order to detect if the motor is spinning.Indeed, if the motor is spinning at that time, it may decelerate abruptly which can be dangerous. Great care must be taken to tightly fasten the motor so that it does not become dangerous when accelerating or decelerating brutally.
Contents[td]
Components
Version
License Terms
Release Note
Utilities/PC_Software/STMotorProfiler1.3.1Binary imageMotor Profiler Release Note
Utilities/PC_Software/STMCWB5.4.1.19278-1.0.3.template-19-06-27Binary ImageMCWorkbench Release Note
Middlewares/ST/MotorControl5.4.1Ultimate LibertyMCFirmware Release Note
STM32Cube Environment
  • STM32CubeMX v5.3.0
  • STM32Cube_FW_F0_V1.10.1
  • STM32Cube_FW_F1_V1.8.0
  • STM32Cube_FW_F3_V1.10.0
  • STM32Cube_FW_F4_V1.24.1
  • STM32Cube_FW_F7_V1.15.0
  • STM32Cube_FW_G0_V1.3.0
  • STM32Cube_FW_G4_V1.1.0
  • STM32Cube_FW_L4_V1.14.0
Development Toolchains
  • IAR Embedded Workbench for ARM (IAR Systems AB) v7.80.4 and v8.20.2.
  • μVision® IDE for Arm® (Keil® MDK) v5.24.2
  • Atollic TrueSTUDIO for STM32 version 9.3.0
  • ST-LINK/V2 v4.2.0
V5.4.0 / 27-May-2019Main Changes
  • Added support for the STM32G4 family.

    • This includes the capability to profile motors with NUCLEO-G431RB+IHM16M1, NUCLEO-G431RB+IHM07M1 and B-G431B-ESC1 setups. See section Profiling motors with NUCLEO-G431RB setups below for important notice about such configurations
  • Added the capability for customers to change the speed unit used at API level. In addition to historic 01Hz, RPM and 001Hz are made available.
  • Added electric angle estimation compensation in the current regulation loop (for Park and inverse Park transforms).
  • Added examples to demonstrates Six-Step motor drive.
  • Added FreeRTOS support for F1, F43, F4, F7, L4 and G4 families.
  • Turned most MC Library routines into __weak functions which simplifies and secures even further the changing or replacement of parts of the code to fit users' needs.
  • Changed the Curr_Components and Volt_Components types to improve code readability.
  • Improved the precision of the reconstruction of the motor speed for Hall sensor configurations.
  • Simplified the usage of the low level API: it is only needed to include motorcontrol.h to use it now.
  • Added examples to support the ESC-F3 and ESC-G4 boards
  • Enhanced the Circle Limitation algorithm so that  is never 0 which prevents some uncontrollable situations.
  • Unidirectional Fast Com component support is reintroduced
  • Added support for negative amplifying network gains in Power stage - Current sensing.
  • Reworked the architecture of Three-Shunt and ICS PWM & Current Feedback components to add flexibility to MCSDK. The Single-Shunt implementations will be reworked as well in a future release.
  • Support arbitrary Timer peripherals for the Virtual DAC feature.
  • The layout of MCSDK in the Windows 10's Start Menu has been reworked:

    • One folder is now created for each version of MCSDK
    • MCSDK's Release Notes are now accessible from this folder
    • The Uninstall program is now accessible from this folder
  • Support for the following boards has been added:

    • STEVAL-CTM009V1 power board configured in ICS topology in Workbench
    • STEVAL-IPMNG3S for 3Sh and 1Sh topology in Workbench
    • STEVAL-IPMNM1S for 3Sh and 1Sh topology in Workbench
    • STEVAL-IPMNM2S for 3Sh and 1Sh topology in Workbench
  • The following issues have been fixed:

    • 1-Shunt configurations from running on STM32F7 devices do not work.
    • Impossibility to use the second DAC channel on STM32F7 devices.
    • Motor Control Registers cannot be read across the UART interface if their value is -1.
    • Wrong PWM duty cycles generation for 1-Shunt configuration on STM32G0 devices. The issue was mostly visible with low PWM frequencies or with a Repetition Counter strictly higher than 1.
    • Wrong computation of the power of the motor in case of negative speed for open loop configurations.
    • Wrong value computed for parameter C5 of the State Observer
    • Detection of motor stall situations in configurations using Hall sensors as speed and position feedback technique.
    • Typo in Break IRQ handler function with F4 3-Shunt configurations
    • IOC clocks frequencies definitions for G0 MCUs.
    • Compilation warnings on non IAR toolchain due to IAR MISRA pragmas: these warning are removed
    • Reuse TIMx CH4 instead of TRGO as ADC trigger within F7 project
    • dual ICS F4 project does not work
    • ICS F7 project does not compile
    • Memory Fault in the RCM Handle Array when Memory Protection is enabled
    • State machine issue with Encoder configuration
    • Shunt resistor(S) value can’t be set less than 1 milliohm in Workbench
    • Expected over-current can’t be set more than 99.99A in Workbench
    • Changed the Shunt Resistor minimum value to 0.0001 in Workbench

Speed Unit at API level
Up to now, the speed unit used by API functions that expect or return a speed (like MC_ProgramSpeedRampMotor1() or MC_GetMecSpeedAverageMotor1() for instance) was the tenth of Hertz (01Hz). For commodity, it is now possible to use other units for these functions. With release 5.4.0, the two new speed units are made available: the RPM (Revolution Per Minute) and the 001HZ (Hundredth of Hertz).
The choice of the speed unit is made at compile time, by setting the SPEED_UNIT symbol to the proper value in file mc_stm_types.h: _RPM for RPM, _001HZ for Hundredth of Hertz and _01HZ for Tenth of Hertz. The SPEED_UNIT define is placed in a User Section so that users' modification are resistant to project regeneration.
The default speed unit at API level remains the Tenth of Hertz for the time being. Refer to the reference documentation of the firmware to get a complete information on the functions that are impacted by this change.
Note: PID parameters computed by the Motor Control Workbench for speed regulation are suited for speed in 01Hz. The motor control subsystem internally scales them to adapt to the actual speed unit.
Profiling motors with NUCLEO-G431RB setups
When using the Motor Profiler with configurations based on a NUCLEO-G431RB control board, the user must make sure that the motor is fully stopped (spinning at 0 RPM) before starting it again whatever the method (by clicking on Play, Start Profile, ...).
Electrical angle estimation compensationThe current regulation loop of the motor control subsystem uses the rotor's electrical angle in its computation. It is needed for the Park transform that computes the  and  current components and then in the Inverse Park that computes the  and  voltages that are passed to the SVPWM algorithm for phase voltage computation.  and  are related to the current PWM period while  and  are meant to be used in the next one.
However, the implementation provided in MCSDK uses the same electrical angle for both the Park and the inverse Park transforms. Though this is not much of a problem when the ratio between the PWM frequency and the electrical rotation speed is high, this may be a problem when this ratio gets lower.
In addition, when using sensor-less configurations, the electrical angle used in a given PWM period is computed on current and V~Bus~ measurements made during the previous one.
The Motor Control firmware now allows for using different angles for the Park and Inverse Park. This is controlled with two symbols defined in the drive_parameters.h file:
  • PARK_ANGLE_COMPENSATION_FACTOR is multiplied to the last measured instantaneous rotor speed (which is the angle variation between the last two PWM periods) and the result is added to the current angle before it is used for the Park transform. Its default value is 0.
  • REV_PARK_ANGLE_COMPENSATION_FACTOR is multiplied to the last measured instantaneous rotor speed (which is the angle variation between the last two PWM periods) and the result is added to the current angle right before it is used for the inverse Park transform for reference computation. Its default value is 0.
A similar set of two symbols, PARK_ANGLE_COMPENSATION_FACTOR2 and REV_PARK_ANGLE_COMPENSATION_FACTOR2 respectively, are defined for the second motor in dual drive configurations.
All these symbols are defined in User Sections so they can be changed without being reset if the project is regenerated.
6-Step Examples
Note that the 6-Step drive implementation that is proposed in these examples is still experimental. Its integration within the Motor Control SDK is very preliminary and will change in future releases.
6 examples are provided on three different configurations:
  • P-NUCLEO-IHM003 motor control kit.
  • NUCLEO-G431RB control board + X-NUCLEO-IHM16M1 power board + BullRunning BR2804-1700Kv-1 motor.
  • NUCLEO-G431RB control board + X-NUCLEO-IHM07M1 power board + BullRunning BR2804-1700Kv-1 motor.
In its current state, the Motor Control Protocol is only partially supported by the 6-Step implementation. Alternatively, a console like, command line interface over the serial port is provided which allows for a finer control over the application.
For each of the three configurations above, two examples are delivered, one for the console interface and one with the Motor Control Protocol.
6-Step Example Usage
In 6-Step configurations, the Motor Control Protocol currently suffers from the following limitations:
  • the mechanical speed of the motor can be set provided that it is positive,
  • the speed ramp mechanism is not implemented yet
  • the speed and application state are the only two internal variables that are monitored. Notably, the temperature, bus voltage and motor power are not measured.
In addition the DAC feature is not supported yet. This status will change in future releases as the integration level of the 6-Step implementation increases.
Alternatively, the 6-Step implementation provides a command line interface over the serial port. This command line interface can be accessed with the TeraTerm terminal emulator for instance and allows for a finer control over the application.
The TeraTerm configuration to use is described in the TERATERM_G431RB_230400_Pnone.ini file delivered with the example.
At startup, the Application prints a banner followed by a list of possible commands as welcome message:







  *******************  * 6 STEP LIB *  *******************  * List of commands:  *   * <GETSPD> Get Motor Speed  * <GETSTA> Get Motor Status  * <SELMOT> Select Motor  * <SETDIR> Set Motor Direction  * <SETSPD> Set Motor Speed  * <STARTM> Start Motor  * <STOPMT> Stop Motor  * ​







Then the application waits for the user to type a command and press the enter key to execute it. Each command is 6 characters long. For commands that expect arguments, first type the name of the command, then press enter and then a prompt line invites the user to enter the value of the argument.
The list of all commands follows:
  • GETSPD: Returns the current mechanical speed of the current motor, in RPM.
  • GETSTA: Returns the current status of the current motor. Posible status are: IDLE, STOP, ALIGNMENT,​ ​ STARTUP, RUN, SPEEDFDBKERROR, OVERCURRENT, VALIDATION_FAIL, LF_TIMER_FAILURE.
  • `SELMOT: Select the current motor. This command does nothing on single drive setups.
  • SETDIR: Sets the direction of the motor. Accept on parameter that can be either CW (Clockwise) or​ ​ CCW (Counter Clockwise).
  • SETDCY: Sets the PWM duty cycle. This command is used to control the motor when the speed loop is​ ​ not built in the application, which is the default case. This command expects one parameter:​ ​ the value of the duty cycle in tenth of percent (in thousandths). Accepted values range from​ ​ 0 to 1000.
  • SETSPD: Sets the mechanical speed reference of the current motor. This command is active only if​ ​ the speed loop has been built in the application. This command expects one argument: the​ ​ speed in RPM.
  • STARTM: Starts the current motor.
  • STOPMT: Stops the current motor.
6-Step Example Configuration
In its current state the configuration possibilities of the application are limited.
There are two ways to configure the example.
  • First, by using STM32CubeMx, to choose which 6-Step features to use: In the Pinout and Configuration view, peripheral pane, click on "A-Z" to list all peripherals and middlewares in alphabetical order. Browse down to MotorControl and click on it. This opens a pane in the middle, showing some configuration options.

    • SIX_STEP_CONTROL_MODE allows for choosing between Current and Voltage modes.
    • SIX_STEP_SPEED_LOOP: if checked, a speed regulation loop is built in the application and mechanical speed reference can be set. If it is unchecked the speed is not regulated and the only way to control the motor is by setting the PWM duty cycle applied to the active phase(s). Such a control cannot be achieved with the Motor Control Monitor at the moment.
    • SIX_STEP_SET_POINT_RAMPING: if checked, builds the Set Point Ramping feature in the application.
    • SIX_STEP_THREE_PWM: this must be checked for power boards where the MCU drives enable signals
      instead of the complementary PWM channels, as it is the case for the X-NUCLEO-IHM07M1 or X-NUCLEO-IHM16M1 power boards and more generally with gate drivers like ST's L6230 or STSPIN830.
  • Other parameters, like motor parameters or PID factors for instance can be changed in the USER CODE sections of the 6step_conf_*.h files.

Working with STM32CubeIDE for Motor Control projects
Motor Control projects generated with STM32 Motor Control Workbench fail to build. Before a solution can be developed for this issue, a work around exists that allows to use ST's new IDE with Motor Control projects by following the procedure described in this section and by respecting a few rules.
  • In STM32 Motor Control Workbench, when generating or updating a project, choose either ST SW4 STM32 or ST TrueSTUDIO as the Target Toolchain. Note: STM32G4 based projects cannot be generated with TrueSTUDIO.
  • Open STM32CubeIDE, go to the File menu and select the "Open Projects from File System..." item.
  • In the dialog that opens, click the "Directory..." button on the "Import source" line. Navigate to the directory that contains the generated project and select it.
  • The Dialog should now propose two projects for import. Select only the one that has the "Convert 'TrueSTUDIO..." or "Convert 'System Workbench...'" mention in the "Import as column". The other one must not be selected.
  • the imported project should build and run as expected.
It is important to follow a few rules when working with such imported projects:
  • Do not edit the project's IOC file from the STM32CubeMx perspective embedded in STM32CubeIDE. A standalone version of STM32CubeMx should be used instead.
  • Do not generate the sources of the project from the STM32CubeMx perspective embedded in STM32CubeIDE. A standalone version of STM32CubeMx should be used instead.
  • Each time the project is (re)generated (wether from CubeMx or from MC Workbench), it needs to be imported again in STM32CubeIDE.
V5.3.3 / 18-Jan-2019Main Changes
  • Fixed an issue with VBus and Temperature acquisition when performed with another ADC than the current sensing one.
  • Fixed an issue with the building of projects generated for devices of the STM32G0 family.
  • Fixed an issue that prevented the use of the DAC peripheral for some STM32F0 MCUs like the STM32F051xxx.
  • Fixed an issue with the configuration of the current sampling ADC on STM32F401 when building with the HAL Drivers instead of the LL ones.
  • Added support for the STM32G0 family with Atollic TrueSTUDIO.
  • Complex firmware examples are now accessible directly from Workbench.
  • Added a FreeRTOS based example working on the P-NUCLEO-IHM001 motor control kit.

V5.3.2 / 21-Dec-2018Main Changes
  • Fixed an issue with negative speed in Open Loop mode.
  • Fixed an issue that prevented dual drive 1 shunt configurations to build on IHM042V1
  • Fixed an issue with the Potentiometer example that could not build with TrueSTUDIO.
  • Reintroduced some example projects that had been removed in previous version
  • Fixed the incorrect configuration of HSE value with STM3240G-EVAL and STM3241G-EVAL control boards when converting projects from older Workbench versions
  • Fixed pinning configuration issues when creating projects based on IHM042V1, NUCLEO-F302R8 + IHM08M1, F4 and some F3 boards.

V5.3.1 / 10-Dec-2018Main Changes
  • Added support for the STM32G0 family (See Supported devices and boards above). Note that this support does not include Atollic TrueSTUDIO yet.
  • The installer of the Motor Control SDK can now install for all users or for the current one.
  • Support of two different ADCs for the VBus and Temperature measurements.
  • The Workbench now lets the user selects the LL/HAL version to use.
  • Added an Example using FreeRTOS with a Motor Control Application
  • Added an example with a Gimbal motor and the IHM16M1 power board.
  • Fixed an issue in F4, 3-Shunt, 1 ADC current sensing that resulted in either an Over Current or a Speed Feedback error.
  • Fixed an issue that prevented dual drive configurations to work in the case where the motors had different PWM frequencies.
  • Fixed an issue that prevented single shunt configurations driving the low side transistors on STM32F446 to work.
  • Fixed FOC and SW Error issues that happened on STSPIN32F0/STM32F0 when the PWM Frequency was set above 18KHz.
  • Fixed the CCMRAM examples for TrueSTUDIO.
V5.2.0 / 03-Aug-2018Main Changes
  • Added support for the STM32F7 family (See Supported devices and boards above)
  • Added support for the STM32L4 family (See Supported devices and boards above)
  • Added support for the STM32F401 device and the NUCLEO-F401RE board
  • Introduction of the Regular Conversion Manager to manage application's and motor control subsystem's ADC regular conversions
  • Added CCMRAM support for Atollic TrueSTUDIO toolchain in related examples
  • Added a HardFault Handling routine that stops PWM generation to all STM32 Families (already implemented for F3).
  • Display Firmware version used by ST MotorControl Workbench in "About" dialog of the Workbench
  • Fixed an issue in workbench where the list of proposed ADC channels would not match the selected ADC peripheral for STM32F4 devices.
  • Fixed an issue in workbench that only allowed for selecting TIM3 and TIM4 for Hall Sensors and Encoder handling for F4 Series. Now, TIM2 and TIM5 can also be selected.
  • Fixed an issue in the firmware that would lead to defining handle variables multiple times in 3 Shunt, shared resourced configurations.
NUCLEO-F746ZG and IHM07M1 power board
The DIAG/EN (over current detection) output of the L6230 driver on the IHM07M1 power board is used as Break Input of the PWM timer. This signal routed to three pins on the C12 connector of the NUCLEO-F746ZG board. One of these pins, C12_28, leads to the PB14 pin of the MCU which also controls one of the LEDs featured on this board.
If PB14 is configured to control the LED, the Break Input gets triggered when the LED is switched resulting in false over current faults. to avoid this issue, resistor R49 needs to be removed from the IHM07M1 board or PB14 must not be configured as output.
Note that ST Motor Control Workbench configures PB14 to drive the LED.
Regular Conversion Manager
The Regular Conversion Manager (RCM) is a new component that primarily aims at handling ADC regular conversions needed by the Motor Control subsystem. These are typically needed for Bus Voltage sensing and Temperature reading.
This component ensures that Motor Control subsystem's regular conversions are performed well whether these conversions are done on an ADC that is already used for Current Sensing or not and even if the target ADC does not support injected channels. This service is needed to prepare for the support of future inverter boards.
The RCM component is instantiated only once in the system.
Customers application are welcome to use this service. Refer to the Reference documentation for more information.
V5.1.3 / 10-Jul-2018
Version 5.1.3 is a bug fix release of X-Cube-MCSDK v5.1.
Main Changes
  • Fixed an issue that prevented the SysTick counter from incrementing. Because of this issue, HAL_Delay() was blocking forever.
V5.1.2 / 06-Jul-2018
Version 5.1.2 is a bug fix release of X-Cube-MCSDK v5.1.
Main Changes
  • Added support for STM32F1 based Nucleo board
  • Added support for the STM32F3 based ESC inverter board (includes Motor Control Profiler)
  • Added support for Atollic IDE to all examples delivered with the SDK (Except CCMRAM examples).
  • Fixed the name of the MC library in the CCMRAM + Atollic configuration. This issue prevented from building such configurations.
  • Fixed an issue with the configuration of the ADC in STM32F3, Shared resources with external OpAmps cases.
  • Fixed an issue where Id ref would not go back to 0 when exiting the flux weakening state.
  • Fixed an issue with the startup procedure that was sometimes having undefined behavior on failure.
  • Fixed return type of MC_StopMotor*() function. They now return a boolean value to indicate success or failure.
V5.1.1 / 07-Jun-2018
Version 5.1.1 is a bug fix release of X-Cube-MCSDK v5.1.
Main Changes
  • Fixed an issue that prevented STM32CubeMx version 4.26 from generating ST Motor Control SDK projects. STM32CubeMx versions 4.25.x still work with the SDK.
  • Updated X-Cube-MCSDK-FUL release of the SDK with missing examples.
  • Fixed the handling of Low sides Idle state for all families. Setting it to a different value than that the High sides is now has the expected effect.
  • Fixed the handling of the High sides Polarity and Idle state for STM32F1 and STM32F4 families. Setting them to values that differ from the defaults now has the expected effect.
Development Toolchains
  • IAR Embedded Workbench for ARM (IAR Systems AB) v7.80.4 and v8.20.2.
  • μVision® IDE for Arm® (Keil® MDK) v5.25
  • Atollic TrueSTUDIO for STM32 version 9.0.0
  • ST-LINK/V2 v4.2.0
V5.1.0 / 05-Jun-2018Main Changes
  • Added support for the STM32F1 High Density series (See Supported devices and boards below);
  • Added support for STEVAL-SPIN devices (See Supported devices and boards below);
  • Introduction of the Power Factor Correction feature for STM32F103 High Density MCUs;
  • Added support for Atollic® TrueSTUDIO® IDE on STM32F3 Family;
  • Added the possibility for the user to choose the version of STM32CubeMx to use;
  • Added support for the Start/Stop motor button;
  • Added support for IP initialization with LL libraries (except for STM32F1 family)
  • Bug fixes, among which:

    • Complementary Dead time is not set to 0 anymore in some STM32F4 configurations
    • Restored support for IAR 7.x versions

Complementary Dead time setting on STM32F4
In earlier versions of ST Motor Control SDK, Motor Control configurations using an STM32F4 MCU and a power board where both the high-side and low-side transistors are driven by the MCU are faulty: The complementary dead time parameter is set to 0 which may result in destructive short-circuits on the power stage.
This issue is fixed in ST Motor Control SDK version 5.1.0. It is highly recommended to update any such STM32F4 based project to this version of the SDK.
Note that configurations using motor drivers that automatically handle this dead time (such as the L6230 featured in the X-NUCLEO-IHM07M1 power board for instance) are not impacted.
Power Factor Correction
The Power Factor Correction (PFC) feature is provided as an example running on the STEVAL-IHM034V2 inverter board. Look in the folder where the SDK is installed, in the Projects\STEVAL-IHM034V2\MotorControlWithPFCExample folder.
The PFC feature has been validated with an electronic load.
TrueSTUDIO® IDE on STM32F3 Family support
The support of TrueSTUDIO® requires the use of the STM32Cube MCU Package for STM32F3 Series version 1.9.1 .
Note that TrueSTUDIO® support for other STM32 families may be added with new versions of the STM32Cube MCU Packages for these families.
Warnings
  • The start/stop motor button is not supported on STEVAL-SPIN boards;
  • STM32F0 based projects built with the MDK-ARM (Keil) tool chain may fail to spin the motor and show a FOC duration error. To prevent this, the PWM Frequency parameter in Driver Management, Drive Settings, should be lowered (typically down to 10 KHz) in the ST MC Workbench.
Development Toolchains
  • IAR Embedded Workbench for ARM (IAR Systems AB) v7.80.4 and v8.20.2.
  • μVision® IDE for Arm® (Keil® MDK) v5.25
  • ST-LINK/V2 v4.2.0
STM32CubeMX Environment
  • STM32CubeMX v4.25.1
  • STM32Cube_FW_F0_V1.9.0
  • STM32Cube_FW_F3_V1.9.0 / STM32Cube_FW_F3_V1.9.1
  • STM32Cube_FW_F4_V1.19.0
V5.0.3 / 17-Apr-2018Main Changes
  • Version 5.0.3, bug fix release of X-Cube-MCSDK v5.0.
  • Fixed the detection of the latest STM32CubeMx versions by ST Motor Control Workbench.
  • Fixed Virtual Bus Voltage Sensor integration in ST Motor Control SDK.
Development Toolchains
  • IAR Embedded Workbench for ARM (IAR Systems AB) v7.80.4 and v8.20.2.
  • μVision® IDE for Arm® (Keil® MDK) v5.25
  • ST-LINK/V2 v4.2.0
STM32CubeMX Environment
  • STM32CubeMX v4.25.0
  • STM32Cube_FW_F0_V1.9.0
  • STM32Cube_FW_F3_V1.9.0
  • STM32Cube_FW_F4_V1.19.0
V5.0.2 / 04-Apr-2018Main Changes
  • Version 5.0.2, bug fix release of X-Cube-MCSDK v5.0
  • Support for several, parallel versions of the Motor Control SDK (See below)
  • Support for IAR EWARM versions 8.x
  • Support for μVision® IDE for Arm® (Keil® MDK) v5.24.2.0
  • Support for mixed 1-shunt / 3-shunt dual drive setup with STM32 F3.
Parallel Motor Control SDKversions support
Several versions of the Motor Control SDK can be installed in parallel on the same PC.Version 5.0.1 of the Motor Control Workbench would install the Motor Control Firmware in the user’s STM32Cube repository in the MotorControl folder (typically in C:\Users\<username>\STM32Cube\Repository\MotorControl). With version 5.0.2 onwards, the firmware is installed in the MCSDK_vX.Y.Z\MotorControl subfolder of the user’s STM32Cube repository where X.Y.Z is the version of the SDK (for instance C:\Users\JohnDoe\STM32Cube\Repository\MCSDK_v5.0.2\MotorControl). This allows for keeping several versions of the SDK and so to keep on working on application projects developed with different versions of the SDK.
The version of the SDK used on a given project is that of the Motor Control Workbench used to generate that project. Put in other words, Motor Control Workbench generates projects for the SDK version it is delivered with.
The version of the SDK to use is not stated in the .stmcx file. It is in the .ioc file generated by the workbench. So, when a project has been generated with a given version of the workbench is sticks to it. Unless it is generated again or updated with another version of the Workbench. In that latter case, it is recommended to erase the MCSDK_vX.Y.Z folder from the previous version…
V5.0.1 / 08-Mar-2018Main Changes
  • First release of X-Cube-MCSDK v5.0.
License
This software package is licensed by ST under ST license SLA0048, the "License"; You may not use this package except in compliance with the License. You may obtain a copy of the License at:

For a complete documentation on STM32 Microcontrollers, please visit us at [http://www.st.com/STM32](http://www.st.com/internet/mcu/family/141.jsp)


V1.0.0 / 08-Mar-2018Main Changes
  • No changes for ST Motor Profiler v1.0.0.
Supported devices and boards
The current version of ST Motor Profiler only supports a selection of Control and Power board pairs:
NUCLEO-F303RE:
X-NUCLEO-IHM07M1, X-NUCLEO-IHM08M1, X-NUCLEO-IHM16M1, STEVAL-IPM05F, STEVAL-IPM10B, STEVAL-IPM15B, STEVAL-IPMNG3Q, STEVAL-IPMNM1N
NUCLEO-F302R8, NUCLEO-F401RE, NUCLEO-F446RE, NUCLEO-L476RG, NUCLEO-L452RE:
X-NUCLEO-IHM07M1, X-NUCLEO-IHM08M1, STEVAL-IPM05F, STEVAL-IPM10B, STEVAL-IPM15B, STEVAL-IPMNG3Q, STEVAL-IPMNM1N
NUCLEO-F746ZG:
X-NUCLEO-IHM07M1, X-NUCLEO-IHM08M1
STM32303E-EVAL, STM3241G-EVAL, STM3240G-EVAL, STM32F769I-EVAL, STM32L476G-EVAL:
STEVAL-IHM023V3, STEVAL-IHM028V2, STEVAL-IPM05F, STEVAL-IPM10B, STEVAL-IPM15B, STEVAL-IPMNG3Q, STEVAL-IPMNM1N
Known Limitations
  • The ST Motor Profiler software tools is running only on a PC system, and has been tested using a Windows 7 Operating System.
License
This software package is licensed by ST under ST license SLA0048, the "License"; You may not use this package except in compliance with the License. You may obtain a copy of the License at:

For a complete documentation on STM32 Microcontrollers, please visit us at http://www.st.com/STM32





回复

使用道具 举报

0

主题

23

帖子

55

积分

注册会员

Rank: 2

积分
55
发表于 2020-9-20 22:27:02 | 显示全部楼层
这个就比较复杂了  看不懂  看不懂 不过 能懂大意
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|dmBot Inc. ( 粤ICP备19140833号-1 )

GMT+8, 2024-5-21 00:27 , Processed in 0.029496 second(s), 21 queries .

Powered by dmBot!

© 2001-2029 dmBot Inc.

快速回复 返回顶部 返回列表