Part Number: TMS320F28377D
Hi Experts,
This is a question related to a earlier thread.
We are facing the similar issue here.
We use updown count, CAU as low and CAD as high. 3 EPWM is involved, 2 ePWM is phase-shfited by a constant 120 degree. Frequency is fixed, duty may varies.
We are also seeing missing pulse when CMPA is close or equal to the TBPHS.
Our confusion is below:
Is this true that all the TBCTR values of all the PWMs should remain in exact phase with each other after the initial sync since all these are being driven by the same peripheral clock? In this case the subsequent sync events should have practically no effect.
For the TBCTR to CMPA, there must be a "skip" for TBCTR, for example at some point the TBCTR changes from x to x+2 when counting up, so that it misses CMPA=x+1. However, any "skip" must have effect on the period, if the period is correct in long term, there should not be any skip in the counter.
Lets take a simple example:
PRD=6 CMPA=2, TBPHS(ePWM2)=3, sync to count up, updown count, the counter should goes as the following:
ePWM1: [2 1 0 1 2]
ePWM2: [0 1 3 4 5]
I assume TBCTR2 skip from 1 to 3 and miss an CAU in this period, but let's see the next period.
ePWM1: [3 4 5 4 3 2 1 0(sync)]
ePWM1: [4 3 2 1 0 1 2 3(sync)]
There is no skipping at all in this period, and so is the following periods.
As the result, as long as the TBPHS and PBPRD for all ePWM remains constant, there would not be any "skip" from the second and next period (Maybe it would skip upon the first sync)
If we can ensure TBCTR would not skip, then cause of miss pulse might be a CMPA change. However, with the CMPA only load on CTR=0 (and not load a sync), I can see no ways that the CTR can missing CMPA.
Could you please help further explaining how the missing pulse can happen
Regards,
Hang