cancel
Showing results for 
Search instead for 
Did you mean: 

3 phase PWM Commutation

ajishsaji
Associate II

Hello,

I am using Timer 1 for the generation of 3PWM and their complimentary Signals and I am getting all 6 PWM waveforms.

For six step commutation I need to add phase delay between the channels of the timer. Is it possible using any HAL function? I am not using any motor control library or example code.

 

Can anyone guide me.

 

Regards,

Ajish Saji

12 REPLIES 12

Hello @ajishsaji 

Then I suggest you to keep using your channel 1, 2 and 3 of TIM1 to generate your PWM. But do it like this:

Start generating pwm1->delay (T/3)->Start generating pwm2->delay (T/3)->Start generating pwm3.

T is your PWM signal period.

Best regards

II

Hello @Issamos,

I have already tried doing that but still getting the same issue where the delay is applied on the 1st ON time but it resets to default once the 1st PWM starts again 

Maybe if you write the code on your while(1) loop the code will work.

Best regards.

II