This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Phase shift / sync of PWM channels with variable frequency - missed compare events

Hi all,

we are using phase shift / sync on 28062 PWM channels with variable frequency in up-downcount and observe missed compare events.

The missed compare events occur after changing the period+phase registers and when the compare event is nearly at the phase shift value.

F.e. the PWM counter is in upcount, period=1500, compare=999. If the phase shift is 1000, the counter may jump from 998 to 1000 due to the sync+phase, skipping the compare event (unfortunately, the compare event only occurs on ctr==compare, not ctr >= compare on upcount and ctr <= compare on downcount).

There is only a small note on page 264 of spruh18d.pdf "An EPWMxSYNCI external synchronization event can cause a discontinuity in the TBCTR count sequence. This can lead to a compare event being skipped. This skipping is considered normal operation and must be taken into account."

How can this be taken into account? Does somebody have a solution for those missed compare events?

@TI staff: Are there considerations to change the compare from ctr==compare to ctr >= compare on upcount and ctr <= compare on downcount on future devices to avoid missed compare events on sync?