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.
Tool/software: Code Composer Studio
I am using EPWM to drive mosfets at 250kHz in bridgeless boost PFC topology with a H bridge. I tried the EPWM complimentary using deadband module, however I am getting zero-crossing current spikes. I tried to drive the pulses by generating complementary pwm (independent modulation of EPWM A and B) with software deadband (subtracting from the duty), the spikes were gone , however the if I provide 0.8-duty to 1A, 1B follows the same in the output, even though in the code 1B is given duty. I have used action qualifier register to define compare registers A and B.
EPwm2Regs.TBCTL.bit.CLKDIV = 0; // CLKDIV = 1
EPwm2Regs.TBCTL.bit.HSPCLKDIV = 0; // HSPCLKDIV = 1
EPwm2Regs.TBCTL.bit.CTRMODE = 2; // up-own mode
EPwm2Regs.AQCTLA.all = 0x0090;
EPwm2Regs.AQCTLB.all = 0x0600;
EPwm2Regs.TBPRD = 300; // 250 KHz
EPwm2Regs.CMPA.half.CMPA = EPwm2Regs.TBPRD/2; // 50% duty cycle first
EPwm2Regs.CMPB = EPwm2Regs.TBPRD/2;
EPwm3Regs.TBCTL.bit.CLKDIV = 0; // CLKDIV = 1
EPwm3Regs.TBCTL.bit.HSPCLKDIV = 0; // HSPCLKDIV = 1
EPwm3Regs.TBCTL.bit.CTRMODE = 2; // up-down mode
EPwm3Regs.AQCTLA.all = 0x0090;
EPwm3Regs.AQCTLB.all = 0x0600;
EPwm3Regs.TBPRD = 300; // 250 KHz -
EPwm3Regs.CMPA.half.CMPA = EPwm3Regs.TBPRD/2; // 50% duty cycle first
EPwm3Regs.CMPB = EPwm3Regs.TBPRD/2;
main code:
if((spll1.sin)>0)
{
EPwm2Regs.CMPA.half.CMPA=0;
EPwm2Regs.CMPB=0;
EPwm3Regs.CMPA.half.CMPA=((0.8-Modu)*EPwm3Regs.TBPRD);
EPwm3Regs.CMPB=((Modu)*EPwm3Regs.TBPRD);
}
if((spll1.sin)<0){
EPwm3Regs.CMPA.half.CMPA=0;
EPwm3Regs.CMPB=0;
EPwm2Regs.CMPA.half.CMPA=((0.8-Modu)*EPwm2Regs.TBPRD);
EPwm2Regs.CMPB=((Modu)*EPwm2Regs.TBPRD);
}
Please help me understand why I am not able to independently modulate EPWM xA and xB.
Thanks