Hello,
I was wondering how I could have three PWM signals from three different GPIOs produce a PWM signal which is phase sifted by a certain degree.
How would I go about this approach ?
Thanks.
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 was wondering how I could have three PWM signals from three different GPIOs produce a PWM signal which is phase sifted by a certain degree.
How would I go about this approach ?
Thanks.
Rajan, the issue you're facing is because you're using TBCTR for enabling the shift and the clocks for ePWMs are not in-sync. As I can see above TMCLKSYNC are individually configured. Try this change first:
EALLOW;
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 0; // DISABLE TBCLK TILL EPWM CONFIGURATION
EDIS;
//ALL PWM CONFIGURATIONS
//AND FINALLY:
EALLOW;
SysCtrlRegs.PCLKCR0.bit.TBCLKSYNC = 1; // ENABLE TBCLK TILL EPWM CONFIGURATION
EDIS;
You've done 2 times for both ePWM configuration. If this doesn't work try configuring TBPHS register instead of TBCTR.
Regards,
Gautam
Rajan Joshi said:
I was wondering if I could be specific about how much the offset would be ? Since i am using a driver to power a three phase motor, I need the waves to be 120 degrees out of phase, is it possible to do this?
Can you be clearer about the offset you're talking about? Are you still observing any offset during the phase shift?
Regards,
Gautam
Hey Gautam,
I was able to go through the pdf of PWM and able to find the phase shift.
It is located on page 86 of the manual !
Thank you for the help !
Rajan Joshi