Part Number: TMS320F280049C
Tool/software: TI C/C++ Compiler
Hi,
I was trying to blank pulses using trip zone (trip4, epwm1a alone). I used the following lines to achieve this.
EPwm1Regs.DCAHTRIPSEL.bit.TRIPINPUT4 = 1; //enabling tripinput4
EPwm1Regs.DCTRIPSEL.bit.DCAHCOMPSEL = 3; //selecting tripinput 4
//configuring trip zone for pfc
EPwm1Regs.TZCTL.bit.TZA = 2; //Force EPWMxA to a low state
EPwm1Regs.TZCTL.bit.DCAEVT2 = 2; //Force EPWMxA to a low state
EPwm1Regs.TZDCSEL.bit.DCAEVT2 = 2; //DCAH = high, DCAL = don't care
Now, I wanted to try the same with another epwm (along with the existing one), in which I want to blank both epwm2a and epwm2b when after certain voltage level is reached. For this I used trip5 and b4 pin as analog input. I used the following lines for this.
EPwm2Regs.DCTRIPSEL.bit.DCAHCOMPSEL = 4; //selecting trip5
EPwm2Regs.DCAHTRIPSEL.bit.TRIPINPUT5 = 1; //selecting trip5
EPwm2Regs.TZCTL.bit.TZA = 2; //force epwm2 to low
EPwm2Regs.TZCTL.bit.DCAEVT2 = 2; //force epwm2 to low
EPwm2Regs.TZDCSEL.bit.DCAEVT2 = 2; //DCAH = high, DCAL = don't care
But with this code, epwm2a is always blanked while epwm2b has pulses. No matter the input analog voltage, the same thing repeats. I observed that the same thing repeats with epwm2b when I change DCA to DCB. What I don't understand is why I did not encounter this in the first case?
Can someone help me out with this? Is there something I am missing?
And how will I be able to blank both the channels of epwm2 simultaneously with the same voltage level?
Regards,
Reshma