Motor control SDK - manual control API implementation
Hi all,
I am using the STSPIN32G0252Q chip on a custom board (implements 3-shunt current sensing and back-EMF measurement, alongside the required drive features). I have designed the board in the MC Workbench, and have manually profiled the motor I am using, as the motor pilot tool doesn't support the Cortex-M0+ range.
However I am finding it difficult to know where to start with actually implementing the code generated by the workbench/CubeMX; I can see that all of the control functionality is present, but there doesn't seem to be any documentation on how to actually run a motor using just API/HAL calls, instead of using the motor pilot. I have read the SDK documentation, but while this lists all of the functions and control algorithms it doesn't seem to show what a simple implementation loop would look like. Worse still, there seems to be some conflicting information about what each function does (e.g., whether the MC_StartMotor function needs a speed/torque ramp pre-programmed or not).
Does anyone have any tips to point me in the right direction?
Thanks in advance!
