cancel
Showing results for 
Search instead for 
Did you mean: 

where to start "Examples"

A1bucker
Associate III

I am trying to get oriented to STM32 environment for BLDC motor control. I have made it through motor profiler, motor control workbench, STM32CubeMX, and can generate a .ioc "I think that is the right file type" and load it to my B-G431B-ESC, but

for the life of me I can't find some existing examples for such to get me started in the actually coding in STM32cubeIDE. Something simple like the proper syntax for initializing the motor, starting the motor calling speed, torque, angle and such. please point me in a direction.

I come from Arduino, self taught. there is a lot of available libraries in Arduino making it a lot easier to get started.

4 REPLIES 4
Semer CHERNI
ST Employee

Hello @A1bucker​ 

First let me thank you for posting.

The first thing I can suggests is to check these two links

I hope that those links came to help.

Kind regards,

Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

A1bucker
Associate III

While the two links were interesting and educational, neither of them provided the information I am looking for.

Where can I find a list of APIs for writing user interface instructions, like mc_startMotor. I need a starting point. There must be a document of api commands surely?

A1bucker
Associate III

Perhaps it would be best if I provide an idea of what I am looking for. I'm new to ST and fairly new to programming. I want to add to my motor control generated .ioc in human terms

Initiate motor

Get motor position

Turn motor at some speed

Stop motor

reverse motor at some given rpm

Set torque

If pin pa15 gets pwm input, move motor per input

Hopeful this helps

Max
ST Employee

Hello @A1bucker​ ,

Maybe what you are looking for is inside the installation directory of the Motor control workbench:

C:\Program Files (x86)\STMicroelectronics\MC_SDK_x.x.x\Documentation

The MotorControlSDKFirmware.chm includes a description of the API.

There is also a set of helpful PDF documents.

Let us know if this helped!

Best regards,

Maxime