cancel
Showing results for 
Search instead for 
Did you mean: 

Any example on how to use MCSDK 5.0?

Electric Forest
Associate III
Posted on May 15, 2018 at 03:11

The 5.0 version use commands like 'bool MC_StartMotor1(void);' instead of the old 4.3 'bool MCI_StartMotor(CMCI this);' This api change is documented in AN5143 rev 2.

A google search on MC_StartMotor1 gives one hit - in that application note.

Where can I find example code that use this new api?

Or any documentation on how to use it?

And I wonder why stuff like the potentiometer example still is using the old api.

Are anyone programmatically (not using motor profiler) driving motors with 5.0?

Thanks for any help.

3 REPLIES 3
PBo
Associate III
Posted on June 11, 2018 at 15:46

Hello Electric,

Please, find attached an example using the standard P-NUCLEO-IHM001 hardware setup.

This example provides you with the following features:

1/Green LED usage, on the NUCLEO-STM32F302R8 control board, to reflect the Motor state machine status (Green = RUN status);

2/Red LED usage, on the X-NUCLEO-IHM07M1 power board, to reflect any error occurrence during the Motor usage (Red = Error);

3/Blue Button usage,

on the NUCLEO-STM32F302R8 control board, to

start or to stop the Motor;

4/Blue Potentiometer usage,

on the X-NUCLEO-IHM07M1 power board,to tune the speed of the Motor (from 0 to its maximum speed).

(However, please note that spinning the Bull Running motor at low speed <~1000 rpm doesn't work and do generate an error ;)

The 'main.c' source file contains all these implemented features (as exercises), while the 'MCSDK - Potentiometer.stmcx' file is the ST MC Workbench (MC SDK v5.1.1) configured project file, and the 'MCSDK - Potentiometer.ioc' file is the STM32CubeMX (v4.1) configured project file.

Enjoy it :)

PBo

________________

Attachments :

MCSDK - Potentiometer.stmcx.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxWB&d=%2Fa%2F0X0000000az9%2F1b2vVFC8p_MXf966J9_aMN_y8dimGBuuD0IAXMayNoA&asPdf=false

MCSDK - Potentiometer.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxW6&d=%2Fa%2F0X0000000azC%2FX4MBMUBP5cRrCIo8SziUX24jG_C8k9lPiIjgToM6MuU&asPdf=false

main.c.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxVd&d=%2Fa%2F0X0000000azA%2FCoVkBLNylKYu8yBOOty8cJ01.D6nojSLxpbdkynylBA&asPdf=false
GArun
Associate II

can you share example code for start, stop and change RPM

Laurent Ca...
Lead II

The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK). 

Best regards