Tool/software:
I asked this question a few months ago, and I finally got back to investigating it. The problem with using the N2HET loop-sync as the sync-in for the EPWM, is my N2HET loop period is ~333ns, and my EPWM period is 25us.
In order to try to set both the EPWM and N2HET as a 40Khz PWM period, the N2HET loop-period is ~333ns, and the N2HET CNT is 75 (0 to 74), but the EPWM TBPRD is 1875 at this clock rate.
What I want to do, is align the beginnings (count = 0) of both N2HET and EPWM -- but also allow each peripheral to fully count up. Using the N2HET loop-sync essentially resets the EPWM to 0 every 333ns, so the EPWM never runs.
The only way I can see to possibly do this is to use the N2HET to drive an external pin at CNT=0, which is shorted to the external ePWM1SYNCI, and the EPWM would sync on this external input? Can you think of another idea?
Thanks,
Jim