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.

TIDM-1022: Interleaved PWM Generation

Part Number: TIDM-1022

For 2-phase Interleaved operation, does below configuration generates interleaved PWM on  PWM1A(Phase1) and PWM1B(Phase2) ?

I can understand the interleaved PWM generation with symmetric(up-down) mode.

But, ePWM1 is configured for Up counting mode in this. I did not get that.

Can you please explain how it is generated? 

// Set actions
//do nothing to T1 and T2 at the beginning
EPWM_setAdditionalActionQualifierActionComplete(base1, EPWM_AQ_OUTPUT_A,
EPWM_AQ_OUTPUT_NO_CHANGE_DOWN_T2);
EPWM_setActionQualifierActionComplete(base1, EPWM_AQ_OUTPUT_A,
EPWM_AQ_OUTPUT_NO_CHANGE_UP_CMPB);
#pragma diag_suppress 190 // suppress warning 190
EPWM_setActionQualifierActionComplete(base1, EPWM_AQ_OUTPUT_A,
EPWM_AQ_OUTPUT_LOW_UP_CMPB | EPWM_AQ_OUTPUT_HIGH_ZERO);
#pragma diag_suppress 190 // suppress warning 190
EPWM_setActionQualifierActionComplete(base1, EPWM_AQ_OUTPUT_B,
EPWM_AQ_OUTPUT_LOW_ZERO | EPWM_AQ_OUTPUT_HIGH_UP_CMPA);

/* Loading of the compare registers from duty cycle*/

ePwm1Cmpa = ePwm1Cmpc - ePwm1Cmpc*dutyPU;
EPWM_setCounterCompareValue(EPWM1_BASE, EPWM_COUNTER_COMPARE_A, ePwm1Cmpa);

// update channel B
ePwm1Cmpb = ePwm1Cmpc*dutyPU;
EPWM_setCounterCompareValue(EPWM1_BASE, EPWM_COUNTER_COMPARE_B, ePwm1Cmpb);

Thanks,

Piyush

  • Hi Piyush,

    Yes, it is a valid concern. The reason of using up count mode here in TIDM-1022 is that valley switching is a variable freq control. And only single phase is running when valley switching is enabled. For interleaved PFC, the code you listed does not maintain 180 degree phase shift, so the best way to do it is to use sync mechanism in PWM module and use another EPWM module for the second phase.

    Regards,

    Chen