cancel
Showing results for 
Search instead for 
Did you mean: 

6-Step Algorithm for Sensorless Motor application

Esakkimuthu
Visitor

I am using the STM32 NUCLEO-G474RE control board and the NUCLEO-IHM08M1 inverter board for a motor-control application. I want to run a 6-step (trapezoidal) commutation algorithm, so I need to generate PWM signals from the control board to the driver IC on the power board(NUCLEO-IHM08M1).

The driver IC (L6398) truth table specifies:

  • HIN = 0 and LIN = 0 → Low-side ON

  • HIN = 1 and LIN = 1 → High-side ON

But the STM32 timer provides complementary PWM outputs, where each channel only gives PWM + its inverted output, so it does not match the L6398 input logic. With complementary channels, the outputs are only HIGH or LOW for PWM—they cannot give “both HIGH” or “both LOW” on the same phase simultaneously as required by the driver.

Therefore, I need guidance on how to generate the correct 6-step commutation sequence for the IHM08M1 board using the NUCLEO-G474RE, given that the L6398 requires both HIN and LIN to be controlled independently.

3 REPLIES 3
STuser2
Senior II

STuser2_0-1763104187817.png

STuser2_1-1763104216433.png

 

LIN is active low input, whether you have considered this?

 

Yes, I have considered that LIN is active-LOW.
The L6398 truth table requires the inputs to be equal to turn a MOSFET ON:

  • HIN = 1, LIN = 1 → High-side ON

  • HIN = 0, LIN = 0 → Low-side ON

  • HIN = 0, LIN = 1 → Phase FLOAT (both OFF)

So for low-side ON I must drive LIN = 0, and for high-side ON I must drive LIN = 1.

My practical control scheme:

  • Phase HIGH: HIN = PWM, LIN = 1

  • Phase LOW: HIN = 0 (PWM disabled), LIN = 0

  • Phase FLOAT: HIN = 0, LIN = 1

I will not use the complementary CHxN outputs because they generate the opposite of HIN and would create invalid 1/0 → OFF states.

This approach is correct for 6-step BLDC where:

  • PWM is applied only on the high-side of the active phase, and

  • the low-side of the sink phase remains fully ON (LIN = 0) during the entire step.

Example:
To drive A+ / B- / C floating

  • Phase A: HIN_A = PWM, LIN_A = 1

  • Phase B: HIN_B = 0, LIN_B = 0

  • Phase C: HIN_C = 0, LIN_C = 1

I am not sure how you are generating the code etc, but see if the below CubeMx settings are useful

STuser2_0-1763113682927.png

It is giving an option to generate complementary or independent, verify if it is useful.