Skip to main content
Associate
July 3, 2026
Question

Does STM32 MCSDK support runtime switch-over from 6-step control to FOC?

  • July 3, 2026
  • 0 replies
  • 3 views

Hi ST community,

We are evaluating motor-control architecture for a 3-phase BLDC/PMSM ESC project based on STM32G431 / STSPIN32G4.

Currently we understand that STM32 MCSDK supports both:
- FOC control projects
- 6-step / trapezoidal control projects

However, we would like to clarify whether MCSDK officially supports runtime switch-over from 6-step control to FOC control in the same firmware project.

Our target concept is:

1. Start the motor with 6-step control or open-loop 6-step startup.
2. After the motor reaches a sufficient speed / stable rotor position estimation, switch to FOC control.
3. Continue running with FOC current loop and SVPWM.

Questions:

1. Does MCSDK officially support runtime switch-over from 6-step control to FOC control in one generated project?

2. If not officially supported, is there any ST reference implementation, application note, or recommended method for implementing this handover?

3. Can MCSDK-generated 6-step and FOC control modules coexist in one runtime while sharing the same PWM timer, ADC trigger, current-sensing path, motor-control ISR, and fault-management logic?

4. If this approach is not recommended, what is the recommended ST approach for sensorless startup before entering FOC on STM32G431 / STSPIN32G4?

5. For STSPIN32G4, would ST recommend starting from a pure MCSDK FOC project and tuning the rev-up / sensorless observer handover, instead of implementing a separate 6-step-to-FOC transition?

Our concern is that 6-step control and FOC control may have different assumptions for rotor angle estimation, current sensing, PWM generation, ADC sampling timing, state machine, and protection handling.

We would like to confirm whether this is an out-of-box MCSDK feature, a supported customization path, or an unsupported architecture.

Thank you.