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.

synchronization of a compleate PWM Module

Other Parts Discussed in Thread: TMS320F28335

Hey Ti Guys,

 

I'm using the PWM Module of the tms320f28335 - the Manual discribe that a PWM synchronization of the Phase and Timebase is possible, but I do not know if it is possible to syncronize a compleat PWM Sectoion with the TMS like an Atmel ?

Example:

I got two PWMs: PWMX1 and PWMX2. The first PWM works with 75 Duty, the Second with 25% from one to the other there is a phase of 180° - so can I switch in a State the output of PWM 1 to PWMX1 and  PWM2 to PWMX2, and in the next state PWM3 to PWMx1 and PWM2 to PWMX1 ?

like the pdf (Blue PWMX1, Red PWMX2)

7532.pwm (6).pdf

 

Thanks,

Heiko

  • Heiko,

    What;s the ferquency range that you are working with?

    -Manish

  • 30 kHz.

     

    My actual Solution is to change the Sync in every State:

     

       EPwm2Regs.TBPRD = 250;
           EPwm2Regs.TBPHS.half.TBPHS = 0;
           EPwm2Regs.TBCTL.bit.CTRMODE = TB_COUNT_UP;
           EPwm2Regs.TBCTL.bit.PHSEN = TB_ENABLE;
           EPwm2Regs.TBCTL.bit.PRDLD = TB_SHADOW;
           EPwm2Regs.TBCTL.bit.SYNCOSEL = TB_SYNC_IN;
           EPwm2Regs.TBCTL.bit.HSPCLKDIV = 0x5;                 // Clock ratio to SYSCLKOUT 7,5 MHz
           EPwm2Regs.TBCTL.bit.CLKDIV = 0x1;
          
           EPwm2Regs.DBCTL.bit.OUT_MODE = 0x0;
           EPwm2Regs.AQCTLA.bit.ZRO = AQ_CLEAR;
           EPwm2Regs.AQCTLA.bit.CAU = AQ_CLEAR;

           // Set actions PWM2B          
           EPwm2Regs.AQCTLB.bit.ZRO = AQ_CLEAR;       
           EPwm2Regs.AQCTLB.bit.CAU = AQ_CLEAR;   
          
          // PWM 3.................................
            EPwm3Regs.TBPRD = 250;
            EPwm3Regs.TBPHS.half.TBPHS = 127;
            EPwm3Regs.TBCTL.bit.CTRMODE = TB_COUNT_UP;
            EPwm3Regs.TBCTL.bit.PHSEN = TB_ENABLE;
            EPwm3Regs.TBCTL.bit.PRDLD = TB_SHADOW;
            EPwm3Regs.TBCTL.bit.SYNCOSEL = TB_SYNC_IN;
            EPwm3Regs.TBCTL.bit.HSPCLKDIV = 0x5;                 // Clock ratio to SYSCLKOUT 7,5 MHz
            EPwm3Regs.TBCTL.bit.CLKDIV = 0x1;

     

    but that ist too slow - with an Atmel I can configure two PWM Timers and change the Pin (like in the PDF)