AnsweredAssumed Answered

Set the duty cycle

Question asked by 相国 尹 on Jul 25, 2020
Latest reply on Aug 12, 2020 by Alexis Andalon

In McDrv_pwm3ph_ftm.c in bldc_ref_sol, there is a MCDRV_FtmSetDutyCycle function, which I'm not sure about the duty cycle Settings.

 

i16Duty = MLIB_Mul_F16((i16InpDuty), (this->ui16PwmModulo) / 4);

i16FirstEdge = -(this->ui16PwmModulo) / 4 - i16Duty;

 i16SecondEdge = (this->ui16PwmModulo) / 4 + i16Duty;

 

I think the PWM waveform generated by this setting is shown in the figure below.So the final duty cycle is not consistent with the duty cycle of the input function.I want to know where did I get it wrong?

Attachments

Outcomes