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 synchronization problem when TBPHS is greater than TBPRD in up dowm count mode

I need to generate 4 pwm pulses of 100khz which are phase shifted by 90 degree eachother. I am using F28335 controller. TBPRD is 750 for 100KHZ in up-down count mode (symmetrical) with out any time prescaler.. PWM1 module is selected as master and remaining 3 PWM modules are slaves. Phase shift for remaining pwm modules (TBPHS)  are 375, 750 and 1125 respectively. While running the code, I am able to get 3 PWM pulses of 100KHZ with 90 degree phase shift between each pulses. However. the 4th PWM pulses are not coming. I think it is because TBPHS is greater than TBPRD. Please suggest How to overcome this issue 

  • Hi Shelas,

    You are right. You are not seeing the 4th PWM because TBPHS > TBPRD. The right way to configure the 4th PWM module is to program a value of 1125 - 750 = 375 in the TBPHS register. Make sure that this PWM module is configured to count-down after a sync (or count-up if other 3 PWMs are configured to count-down after a sync). You can do this by correctly initializing the [PHSDIR] bit in TBCTL register.

    I hope this helps.

    Hrishi

  • Dear Hrishi Nene,

                                              Its work for me.  I am able to solve the issue by correctly initializing the [PHSDIR] bit in TBCTL register.  Thank you very much for the suggestion. 

    Best Regards

    Shelas Sathyan