Skip to main content
A1bucker
Associate II
November 15, 2022
Question

where to start "Examples"

  • November 15, 2022
  • 4 replies
  • 1576 views

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.

This topic has been closed for replies.

4 replies

Semer CHERNI
ST Employee
November 16, 2022

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.

A1bucker
A1buckerAuthor
Associate II
November 16, 2022

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
A1buckerAuthor
Associate II
November 16, 2022

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
November 17, 2022

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