使用MCSDK 6.x.0 自定义驱控板

相较于MCSDK 5,MCSDK6给用户更大的自由度,直接开放JSON文件,可以自定义电机控制板的各种参数。咋一看全是对象和属性的文字化配置界面很让人头痛,但懂得如何使用MCSDK6这个版本,可以很好的快速开发自己设计的电机控制工程。

这里我尝试了MCSDK 6.2.0和 6.3.0两个版本的自定义流程,6.3.0多了一个可视化的配置界面,建议直接使用6.3.0这个版本去配置。

接下来,介绍如何使用 MCSDK6 自定义一个驱控板。有两个可以进入自定义编辑界面:Board Manager、Board Designer。

Board Manager

这里可以看到,根据板子的功能,ST把板子分为四种类型,这四种类型都是可以进行自定义的。

这里我选择自定义一个集合了电源组件和控制组件的板子。右下角点Create,就会出现一个空白的模版,这是一个JSON格式的文件,在里面需要填入MCU、时钟源、时钟频率等等信息,我建议可以按照st库里面现成的例程进行一个仿写。右上角有快捷键提示,可以用快捷键检查格式。

写好点保存,就可以退回到主界面,对电机和控制板进行选择,然后生成工程了。

Board Designer

下面这个Board Designer是一个更加直观的可视化界面。我更推荐用这个来建立工程。

点进Board Designer,左下角就是Create new board. 我们还是用Inventor做例子。

按照提示一路选就行了,把必选项填好以后,点Next往下走。

按照实际情况填写相关的Features,电流采样和PWM生成的两个信息必填。按照实际电路板的配置填写就行了。填写无误以后就按Apply进行保存。

所有基础配置完成以后就可以保存,然后退出Board Designer这个界面。回到主界面,点击New project,配置新的工程。

建立新的工程

这里我们就选择Invetord的硬件模式,配上单电机,FOC驱动算法。

电机随便选一个就行,进入到工程可以把电机参数改成自己项目的电机参数。

Inventer这一页可以拉到最下面,能看到自定义的板子,选上就行。

勾选好了就可以next。

一切OK,就可以Generate the project。这里要注意一点,三个版本要相互兼容,否则无法成功生成工程。

更多相关配置信息可以参考ST官方的电机控制板资料:STM32MotorControl:Motor Control Boards Description - stm32mcu (stmicroelectronics.cn)

V5.4.4完整版/2020年5月 STM32电机制软件开发套件(MCSDK)- 完整源代码 主要变化: Version 5.4.4 is mostly a bug fix release of X-Cube-MCSDK v5.4.3. It also introduces some new feature. ◾Added Support for PFC on STM32F3. This support is added as an example for the STEVAL-CTM010V1 Dual motor demo board. ◾Atollic TrueSTUDIO & SW4STM32 Deprecation. Atollic TrueSTUDIO and SW4STM32 IDEs are no longer actively developed and ST's strategy is to replace them with STM32CubeIDE. Recent STM32 series like STM32G4 devices for instance, are already not supported by all these IDEs. In a near future release of the Motor Control SDK, support for these IDE will be dropped and it will not be possible anymore to generate a project for them from the Workbench. ◾Introduced a workaround for the issue with injected ADC conversions that exists on STM32G4xx Cut 2.2 devices. See the dedicated section below for more details. ◾Reintroduced the correct ST Motor Profiler version (the same as release 5.4.1 of the SDK). The Motor Profiler delivered with MCSDK 5.4.2 and 5.4.3 was incomplete. ◾Fixed an issue with the faulty setting of the maximum application current for the second drive in dual drive configurations ◾Fixed an issue with Position Control configurations using an absolute position encoder (with Z signal). ◾Fixed another issue with Position Control where a division by 0 was possible. ◾Fixed a bootstrap capacitor charge issue in ICS configurations ◾Fixed a SW Error that could occur during the offset measurement loop ◾Fixed a code generation issue resulting in a compilation error when enabling open loop. ◾Fixed a STM32H7 example compilation issue - missing files have been added. ◾Fixed a generation issue for some STM32G0 and STM32F0 devices where TIM2 does not exist but was referenced in the code anyway. This resulted in a compilation failure. ◾Fixed an issue with STM32F1 HD devices in single shunt configurations ◾In the workbench, the maximum PWM frequency can now be set as high as 500 KHz. ◾Fixed an issue due to the limited RShunt resolution. Now, values such as 0.00025 Ω are accepted. ◾Fixed an issue with NVIC configuration for IHM34V2 inverter boards. ◾Fixed a Workbench issue that resulted in a wrong pin assignment when creating new projects based on the NUCLEO-G431RB control board. See section Pin assignment with NUCLEO-G431RB for more details. ◾Fixed an issue that resulted in incorrect overcurrent settings with some power boards. See section Over current settings correction for some power boards ◾Enable users to select DAC channel 2 with STM32L452
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值