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.

TMS320F28075: tms320f28075

Part Number: TMS320F28075
Other Parts Discussed in Thread: CONTROLSUITE

Hi,

    I am using ADC channel for measurement of voltage and current.

     How can I make low pwm (or off PWM) using comparator module.

 What setting I should have to do?

 -Sagar

  • Hello,
    I am writing to let you know that a C2000 team member has been assigned to this post and should be answering shortly.

    Regards
    Baskaran
  • Hi Sagar,

    Can you clarify your question?

  • Sagar,

    You can reference the "epwm_trip_zone" example in controlSUITE for a basic example of tripping the EPWM.

    In order to use the CMPSS as the trip source, you would need to route the CTRIP signal through the EPWM XBAR to the DC (Digital Compare) Submodule and configure that path as the trip source.

    -Tommy
  • Hi Frank,

           I am using ADC channel for current (ADC A2).I am sensing ac current.Signal is dc level shift by 1.65V.  If adc result is not in between of 500 and 3500 value then  pwm will be off. I think we can use cmpss (compare sub system ) for operation.I need example for the same.I gone through cmpss_async example but it is only for high comparator.

    Regards,

    Sagar Yadav 

     

  • Sagar,

    Over current detection is one of the common use cases of the cmpss-epwm combination. We don't have examples for every use case because there are too many of them. You are right that the cmpss_async example covers one-sided trip. However, window tripping is also possible. You can achieve this by configuring the low comparator in a similar fashion. To achieve the window trip, you can either OR the trip inputs going into the DC sub-module or OR the signals at the ePWM X-Bar level.

    The DC and ePWM X-Bar chapters in the user guide have a lot more detail on how to achieve this.
  • Frank,

    Thanks for reply.

     I am using EPWM1a & 1b for my application. ADCA2 for current read. I am using Comparator1 subsystem also.

     Comparator output I was assign to EPWMxbar the following way is it correct? 

    // Configure TRIP4 to be CTRIP1H

    //
    EPwmXbarRegs.TRIP4MUX0TO15CFG.bit.MUX0 = 0;

    //
    // Enable TRIP4 Mux for Output
    //
    EPwmXbarRegs.TRIP4MUXENABLE.bit.MUX01= 1;

    // Configure EPWM8B to output high on TZB TRIP
    //
    EPwm1Regs.TZCTL.bit.TZB = TZ_FORCE_HI;
    //
    // Configure DCB to be TRIP4
    //
    EPwm1Regs.TZDCSEL.bit.DCBEVT1 = TZ_DCBH_HI;
    EPwm1Regs.DCTRIPSEL.bit.DCBHCOMPSEL = 0x1;
    EPwm1Regs.DCBHTRIPSEL.bit.TRIPINPUT4 = 1;
    //
    // Configure DCB as OST
    //
    EPwm1Regs.TZSEL.bit.DCBEVT1 = 1;

  • Sagar,

    You can follow the example in cmpss_asynch. If you want the trip to happen for both cmpssl & cmpssh, change the MUX0 to 1. This will trip for either cmpssl or cmpssh.

        //
        //Configure TRIP4 to be CTRIP1H or CTRIP1L
        //
        EPwmXbarRegs.TRIP4MUX0TO15CFG.bit.MUX0 = 1;