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.
Hello, friends!
I try to use T1 and T2 in Action Qualifier module for peak current control for PSFB. But it does not work.
At first I configured EPwm2A for generating PWM. This PWM I connected to COMP1_PLUS.
Here is some source code:
--------------------------------------
EPwm6Regs.AQTSRCSEL.bit.T1SEL = 0x0; EPwm6Regs.AQCTLA.bit.PRD = 2; EPwm6Regs.AQCTLA2.bit.T1U = 1; EPwmXbarRegs.TRIP4MUX0TO15CFG.bit.MUX0 = 0; // Enable Mux 0.0 EPwmXbarRegs.TRIP4MUXENABLE.bit.MUX0 = 1; // Enable Trip4 in EpwmXbar EPwm6Regs.DCTRIPSEL.bit.DCAHCOMPSEL = 3; Cmpss1Regs.COMPCTL.bit.COMPDACE = 1; // Enable CMPSS Cmpss1Regs.COMPCTL.bit.ASYNCHEN = 0; // Async out not used Cmpss1Regs.COMPCTL.bit.CTRIPHSEL = 0; // CTRIPH goes from comp async Cmpss1Regs.COMPCTL.bit.CTRIPOUTHSEL = 0; // CTRIPOUTH goes from comp async Cmpss1Regs.COMPCTL.bit.COMPHINV = 0; // Comparator out is not inverted Cmpss1Regs.COMPCTL.bit.COMPHSOURCE = 0; // Comparator negative source driven by internal DAC Cmpss1Regs.COMPHYSCTL.bit.COMPHYS = 3; // Hysteresis Cmpss1Regs.COMPDACCTL.bit.SWLOADSEL = 0; // DAC values loaded every SYSCLK Cmpss1Regs.COMPDACCTL.bit.SELREF = 0; // VDDA is the reference for DAC Cmpss1Regs.COMPDACCTL.bit.DACSOURCE = 0; // DACHVALS is updated from DACHVALS (shadow register) Cmpss1Regs.DACHVALS.bit.DACVAL = 2000;
--------------------------------------------------------------
But if I configured EPWMxSYNCIN as source for T1 or T2 - it works.
I try to launch it for 1 or 2 weeks :) I think, that there is some little thing that I don't see/understand.
Dmitriy,
configure the comparator trip out to a pin to ensure that it is correctly tripping with an oscilloscope. After that is working we can look at why T1/T2 isn't tripping.
If you want to know more about C2000 in a PSFB application look at:
Regards,
Cody