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.
Hello,
I have a question about the phase that synchronization between ePWM.
I am using the example epwm_ex3_synchronization (driverlib, Ressource Online).
The PWM period is 2000.
The PWM2 is delayed of 300 compared to PWM1.
To check that, I use a scope : the blue signal is PWM1A and the pink one is PWM2A.
It can be seen on the figure hereunder that PWM2 is not delayed of 300 but brought forward of 300.
Is it what was expected eventually ?
If I want to delay instead the PWM2 compared to the PWM1 of 300, what should I change in the code ?
Best regards,
François
Hi François,
If I want to delay instead the PWM2 compared to the PWM1 of 300, what should I change in the code ?
The time base phase shift value (TBPHS) is calculated as follows: TBPHS = (TBPRD * Desired Phase (In Degrees))/180 degrees
Right now, EPWM2 has a phase shift value of 300 -> 300 = (2000*x)/180, meaning a total of ~27 degrees phase shift
If you want to delay EPWM2 with respect to EPMW1 then you can do the following:
180 degrees - 27 degrees = 153 degrees
TBPHS = (2000*153)/180 = 1700
Thus, if you change the TBPHS value of EPWM2 to be 1700 instead of 300 you should see your desired outcome.
Best Regards,
Marlyn