Adding intentional shoot-through in STM32 MCSDK (IHM16M1) – where and how to modify the code?

Hi all,

I’m working with an STM32-based BLDC inverter using the STMicroelectronics IHM16M1 driver board and firmware generated from STM32 Motor Control Workbench (MCSDK).

By default, MCSDK generates safe six-step PWM (complementary outputs with dead-time, no overlap).
For my research / converter-topology experiment, I intentionally need to insert controlled shoot-through intervals (both HS + LS ON of a leg, or selected legs).

I want advice on where in the MCSDK stack this should be done and what is the correct approach.

What I have now

  • Six-step commutation (not FOC)
  • TIMx generating 6 PWM outputs
  • Dead-time enabled by default
  • No shoot-through allowed by MCSDK logic
  • IHM16M1 gate driver hardware (no hardware shoot-through prevention)

What I want to do

  • Insert short, controlled shoot-through windows
  • Synchronized with PWM carrier (not random overlap)
  • Possibly leg-selective (A / B / C)
  • Fully intentional and bounded, not a bug

Questions

  1. Where is the correct layer to implement shoot-through?
    • PWM generation (pwmc_sixstep.c)?
    • Timer configuration (TIMx->CCER, BDTR)?
    • Bypass MCSDK commutation logic completely?
  2. Is it better to:
    • Disable dead-time and manually control overlap?
    • OR keep dead-time and override CCER during specific PWM windows?
  3. MCSDK-specific
    • Which files/functions are safe to modify without breaking the control state machine?

    • Is there any official ST example that allows direct TIM control while keeping MCSDK infrastructure?

This is deliberate and for controlled experimentation for a z-source/hybrid inverter.

Thanks!

The logic that works in my MATLAB (My freq = 20khz)

function [S1,S2,S3,S4,S5,S6] = six_step_with_ST(t)

Ts_sector = 0.02;

Ts_pwm = 1e-4;

D_active = 0.25;

sector = uint8(mod(floor(t/Ts_sector),6));

tpwm = mod(t, Ts_pwm);

T_ST = D_active * Ts_pwm;

T_active = 0.5 * Ts_pwm;

is_ST = (tpwm < T_ST);

is_active = (tpwm >= T_ST) && (tpwm < T_active);

S1=0; S2=0; S3=0; S4=0; S5=0; S6=0;

if is_ST

S1 = 1;

S4 = 1;

elseif is_active

switch sector

case 0 % A+ B-

S1 = 1; S6 = 1;

case 1 % A+ C-

S1 = 1; S2 = 1;

case 2 % B+ C-

S3 = 1; S2 = 1;

case 3 % B+ A-

S3 = 1; S4 = 1;

case 4 % C+ A-

S5 = 1; S4 = 1;

case 5 % C+ B-

S5 = 1; S6 = 1;

end

end

end

Posted Dec 29, 2025, 3:04 AM UTC

16
Loading comments…