Hi,
I'm working on HAL layer for PWM.
I want to let the application layer the ability to activate and terminate the PWMs in sync.
I do it by trip zone usage according to your example.
I use PWM1, PWM2 and PWM4.
The syncOutPulseSource of all the PWMs is EPWM_SYNC_OUT_PULSE_ON_CNTR_ZERO.
The syncInPulseSource of PWM2 and PWM4 is EPWM_SYNC_IN_PULSE_SRC_SYNCOUT_EPWM1.
The phase shift is enabled but the counter is 0.
The PWMs share the same parameters of time base and counter compare.
I see that when I reset the trip zone IO the termination of the PWMs is synchronized:
and the gap between the IO reset to the PWMs termination is 30ns which is OK.
However, when I set the trip zone IO to activate the PWMs there is a delay between them:
The gap between the IO setting and the activation of PWM1, the first PWM to become active , is 8.35us.
The gap between the activation of PWM1 to PWM2 is ~2us and the gap between the activation of PWM2 to PWM4 is also ~2us.
Please advise how to sync the activation of all the PWMs.
Thanks,
Dekel