cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-Motor Control using STSPIN32G0601Q

Mathan Raja
Associate III

Hi,

I’m using the STSPIN32G0601Q (with the STM32G031C8 MCU) for a motor control project.
I want to know if it’s possible to control multiple motors using this device or the STM32 Motor Control SDK.

Thanks,

Mathan

7 REPLIES 7
GMA
ST Employee

Hello @Mathan Raja,

As mentioned in the release note documentation available through Workbench tool > About > Documentations, the dual drive feature is only supported on STM32G4xxSTM32F3xx, and STM32F4xx MCU-related boards.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA
Mathan Raja
Associate III

Hi, 

Currently, we’re using the same drive board (STSPIN32G0601Q) to control two different motors (200W and 500W), one at a time. Each motor runs with its own dedicated firmware, which includes hard-coded motor parameters. This firmware is generated using MC Workbench and STM32CubeIDE.

To simplify the manufacturing process, we’re exploring the possibility of using a single, unified firmware for the motor drive MCU. In this approach, the motor-specific parameters would be sent via UART from our application MCU, depending on which motor is connected.

We’d like to confirm whether this approach is feasible and supported.

Thanks

Mathan

Hello @Mathan Raja,

It is possible if both generated projects are similar and only a few parameters need to be modified (as with the Motor Pilot tool interface).

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA
Mathan Raja
Associate III

Hi @GMA 

Can you please provide more details on how to implement that?
It would be helpful if you could include a few examples.

Thanks

Mathan 

GMA
ST Employee

Hello @Mathan Raja,

You must introduce as many motor control interface (MCI) functions in the mc_interface.c file as required to manage both use case.
The simplest method is to load the associated binary as here.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA

Hi

We are using the STSPIN32G0601Q motor drive board to control two different motors — one rated at 200 W and another at 500 W.
Currently, each motor has its own firmware generated from MC Workbench with hard-coded parameters.

To simplify manufacturing, we are exploring the possibility of using one unified firmware.
Our idea is to store both motor parameter sets (for 200 W and 500 W) inside the same firmware and select the active one via UART command from our application MCU before the motor starts.

We understand that loading a separate binary for each motor is the officially supported approach, but we would like clarification on the following points to check if a unified firmware is still feasible within MCSDK limits:

  1. Which parameters in the MCSDK structures (MCI_Handle_t, SpeednPosFdbk_Handle_t, PID_Handle_t, etc.) can be safely updated at runtime (before calling MC_StartMotor())?

  2. Is there a recommended re-initialization sequence after switching parameter sets (for example, re-executing initialization routines or calling specific APIs)?

  3. Does MCSDK provide any internal API or mechanism to reload motor constants without regenerating the firmware?

  4. Can both motor profiles be safely stored in Flash or EEPROM and loaded at MCU startup?

  5. Are there any risks of control loop instability or FOC timing issues if parameters are changed between MC_StopMotor() and MC_StartMotor()?

  6. Since both motors share the same board hardware (PWM timers, ADC sensing, shunt configuration), do we need to reset ADC/PWM synchronization when switching between profiles?

  7. From a software architecture view, would it be acceptable to store two predefined motor profiles in firmware and select one through UART before motor start?

  8. Is dynamic motor profile loading (for example via UART or stored configuration) planned for any future MCSDK releases?

Any guidance or best practices for this implementation would be greatly appreciated.

Thank you,
Mathan

Hello @Mathan Raja,

Such an approach has not been investigated by ST, and it is not planned for future deliveries.
No API has been developed for motor control parameter loading.
You can refer to the dual drive project (STM32G4, STM32F3, STM32F4) to identify the duplicated motor structures and parameters.

 

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA