cancel
Showing results for 
Search instead for 
Did you mean: 

Why doesn’t my sensorless BLDC motor spin even though commutation and ZCP detection are implemented?

김형건
Associate II

Hello!
I’m currently working on a sensorless 6-step BLDC motor control project using an STM32G474RE.
I implemented the full control flow based on ADC-DMA sampling, center-aligned PWM (TIM1), TIM2-based timing, and ZCP detection logic.

The control flow is as follows:

The motor enters an alignment phase with fixed high/low-side conduction.

It transitions to open-loop commutation for ~1 second.

Once enough steps have passed, I enable ZCP detection.

ZCP is detected when BEMF crosses Vbus/2 with correct polarity.

After ZCP, commutation is scheduled with a 30° electrical delay using TIM1 Channel 4 compare interrupt.

All ADC channels (BEMF_A/B/C, DCBV, DCBI, etc.) are configured correctly, DMA is working, and ZCP detection logic is being called.

However, the motor does not spin at all, even during open-loop startup.

Could someone review the attached code and let me know if there’s something wrong in how PWM, commutation, or ZCP triggering is being handled?

Thank you!

3 REPLIES 3
Fabrice LOUBEYRE
ST Employee

Hi 김형건, if not yet done, i encourage you to set up a 6step project based on the STM32G474RE with ST Motor control Workbench 6.4.0  tool. With this tool, you will have embedded documentation describing the ST 6step solution, examples with STM32G431RB (close to the STM32G474RE) providing a full code implementation of the ST sensor less implementation. As soon as you have generated a code with the STM32G474RE control boards and a power board, you will be able to check differences with your code implementation.

Best regards.

Fabrice

김형건
Associate II
김형건
Associate II

Isn't 'ST Motor control Workbench 6.4.0 tool' related to PMSM? My current goal is BLDC sensorless control.