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.

Compiler/TMS320F280049C: Configuration of compare and epwm x module and ewpm trip zone

Part Number: TMS320F280049C

Tool/software: TI C/C++ Compiler

Hi,

I was working on a small project which uses the comparator module whose inputs are a constant voltage at the -ve side (from DAC) and a feedback on +ve side (external supply) to get the pulses from the module. I've been able to set the limits at the input side and I'm taking the output through the following line:

Cmpss1Regs.COMPCTL.bit.CTRIPHSEL = 1; //Synchronous comparator output drives CTRIPHSEL ie epwm x bars

Now I want to connect this to the trip zone module to block a few pulses coming from the micro-controller to the epwm. That means I need to route epwm x bars to the epwm base registers and then to the trip zone?

The above line of code doesn't tell much about which pin the output is getting latched. How will I get to know which pin I need to select in epwm x bar to get that particular output? And when I do achieve it, how will I be able to route epwm x bar output to the trip zone of epwm?

Or should I be using GPIO x bars instead of epwm x bars for easier access? But still the routing problem remains and I'm not able to sort it out.

Please help me out.

Regards

  • Hi,

    You could use EPWM X-Bar for this purpose. That is the main purpose of EPWM X-Bar to provide internal signal routing, without having to use pins.
    You can refer to the table "Table 9-2. ePWM X-BAR Mux Configuration Table" for available options for input selection in EPWM X-Bar.
    Since you are using Cmpss1 H output - you can enable mux0, output1, 
    YOu've to configure TRIPxMUX0TO15CFG.MUX0 and TRIPxMUXENABLE regs.
    Now, for configuring the trip inside EPWM module, refer to "Figure 18-48. Digital-Compare Submodule High-Level Block Diagram".


  • Hi,

    Thank you, it was clear. But I have a small doubt regarding the trip action. According to the Figure you mentioned (Figure 18-48. Digital-Compare Submodule High-Level Block Diagram), I am using DCAEVT1.force signal to reach trip module. I want the trip action to be performed every cycle by cycle with respect to the signal coming from the Digital compare events.

    According to the manual, there are three operational highlights for trip zone module.

    1. Cycle-by-Cycle (CBC)

    2. One-Shot (OSHT)

    3. Digital Compare Events (DCAEVT1/2 and DCBEVT1/2)

    Since I'm using the third option, is there any way I can achieve my requirement? 

    Regards

  • Hi,

    You could certainly configure DCxEVTy as OSHT or CBC event as needed by your application.
    Refer to TZSEL Register Field Descriptions. For CBC,

    Digital Compare Output A Event 2 Select

    0: Disable DCAEVT2 as a CBC trip source for this ePWM module
    1: Enable DCAEVT2 as a CBC trip source for this ePWM module
    Reset type: SYSRSn

  • Hi,

    Thank you. I was able to clearly get through this module

    Regards