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.

TMS320F28379D: Implement control logic for power supply

Part Number: TMS320F28379D
Other Parts Discussed in Thread: TIDM-DC-DC-BUCK, TIDM-02000

Hi Team, seeking for some information for a customer

Was trying to implement the inbuilt ramp compensation block available in analog comparator module of F28379D. I have a doubt in how to choose the values for RAMPDECVALS and RAMPMAXREFS registers. AS per my understanding the value of RAMPMAXREF is equal to the reference current value and RAMPDECVALS is equal to the magnitude of the ramp. As these parts are not well explained in the reference manual I am not able to understand it properly. So if you can provide some reference materials regarding it, that will be really helpful for me.

Thank you.
-Mark
  • Hi Mark,

    Your understanding is correct. You should program the output our your outer voltage / current loop to the RAMPMAXREFS, which is the starting point of the slope compensation, and then program the rate of slope to the RAMPDECVALS register.

    You can refer to TIDM-DC-DC-BUCK if you are doing a buck converter or TIDM-02000 if you are doing a phase shifted full bridge topology from C2000WARE-DIGITALPOWER-SDK for reference configuration of PCMC implementation with CMPSS. Thanks.

    Han

  • Hi Han, 

     F2837x devices have type-4 PWMs, nd from the figure what I am able to understand that using action qualifier sub module there the epwm waveform pattern is being generated where the trip zone module is not being in used (correct me if I am wrong). But while they try to implement it in hardware it is not working properly. I have also follow the below information for implementation.


    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/780463/tms320f28379d-how-to-use-pwm-t1-t2-signals-to-force-pwm-outputs-without-triggering-tripzone-action


    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcont


    We have attached the epwm module codes for your observation.

    codes:
    void InitEPwm6Example()
    {
    EALLOW;
    EPwm6Regs.TBCTL.bit.PRDLD = TB_SHADOW;
    EPwm6Regs.TBCTL.bit.CTRMODE =TB_COUNT_UP;
    EPwm6Regs.TBPRD = EPWM6_TIMER_TBPRD;
    EPwm6Regs.TBCTL.bit.PHSEN = TB_DISABLE;
    EPwm6Regs.TBPHS.bit.TBPHS = 0x0000;
    EPwm6Regs.TBCTR = 0x0000;
    EPwm6Regs.TBCTL.bit.CLKDIV = TB_DIV1;
    EPwm6Regs.TBCTL.bit.HSPCLKDIV = TB_DIV1;
    EPwm6Regs.CMPCTL.bit.SHDWAMODE = CC_SHADOW;
    EPwm6Regs.CMPCTL.bit.LOADAMODE = CC_CTR_ZERO;
    EPwm6Regs.DBCTL.bit.OUT_MODE = DB_FULL_ENABLE;
    EPwm6Regs.DBCTL.bit.POLSEL = DB_ACTV_HIC;
    EPwm6Regs.DBFED.bit.DBFED = 0;
    EPwm6Regs.DBRED.bit.DBRED = 0;
    EPwm6Regs.AQCTLA.bit.ZRO = AQ_SET;
    EPwm6Regs.AQTSRCSEL.bit.T1SEL = 1;
    EPwm6Regs.AQCTLA2.bit.T1U =0x1;
    EPwm6Regs.TZSEL.bit.DCAEVT2 = 0;
    //EPwm6Regs.EPwm6Regs.DCACTL.bit.EVT2SRCSEL =1;
    EPwm6Regs.DCACTL.bit.EVT2FRCSYNCSEL =1;
    EPwm6Regs.DCFCTL.bit.SRCSEL = 1;
    EPwm6Regs.DCFCTL.bit.BLANKE = 1;
    EPwm6Regs.DCFCTL.bit.BLANKINV = 0;
    EPwm6Regs.DCFCTL.bit.PULSESEL = 1;
    //EPwm6Regs.TZCTL2.bit.ETZE=1;
    //EPwm6Regs.TZCTL2.bit.TZAU=2;
    EPwm6Regs.TZCLR.bit.CBCPULSE=1;
    EPwm6Regs.TZCLR.bit.INT = 1;
    EPwmXbarRegs.TRIP4MUX0TO15CFG.bit.MUX0 = 0;
    EPwmXbarRegs.TRIP4MUXENABLE.bit.MUX0 = 1;
    // EPwm6Regs.DCFOFFSET = EPWM6_BLANK_WND_OFFSET;
    // EPwm6Regs.DCFWINDOW = EPWM6_BLANK_WND;
    EPwm6Regs.ETSEL.bit.INTSEL = 1;//ET_CTR_ZERO; // Select INT on Zero event
    EPwm6Regs.ETSEL.bit.INTEN = 1; // Enable INT
    EPwm6Regs.ETPS.bit.INTPRD = ET_1ST; // Generate INT on 3rd event
    EDIS;
    }TZCTL.bit.TZA= 2;
    EPwm6Regs.TZDCSEL.bit.DCAEVT2 = 2;
    

    Thank you.

  • Mark,

    I would first suggest you route the comparator output to a GPIO pin and make sure the comparator trip really happens, and happened at the desired timing, by putting this signal and the peak current feedback on the same scope screen. This can be done via output XBAR. 

    After verify your CMPSS is working as expected, you can check the ePWM DC and AQ setting (compare with TIDM code) to make sure the PCMC logic is working correctly. Thanks.

    Han

  • Hi Mark,

    Is there any update or further questions for this topic? Thanks.

    Han