2023-09-12 10:13 PM
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
2023-09-13 03:40 AM
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
2023-09-13 06:21 AM
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
2023-09-13 06:31 AM
Maybe if you write the code on your while(1) loop the code will work.
Best regards.
II