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.

TMS320F280048-Q1: Combinational Trip Input for DC module

Part Number: TMS320F280048-Q1
Other Parts Discussed in Thread: SYSCONFIG

Hi,

I have driverlib based project. I separately test the below trip functions which works fine.

Now, I want to use combination of all as below. I wrote below lines but it didn't work.

I just want to use above trips as combination input. Could you please write me code snippets to configure combinational input combination?

It couldn't find driverlib function. 

Thanks

  • Hi Gokhan,

    You can do something like the following (note, your EPWM base may be different - I used SysConfig to generate the code below)

    EPWM_setTripZoneAction(myEPWM0_BASE, EPWM_TZ_ACTION_EVENT_TZA, EPWM_TZ_ACTION_LOW);	
        EPWM_setTripZoneAction(myEPWM0_BASE, EPWM_TZ_ACTION_EVENT_TZB, EPWM_TZ_ACTION_LOW);	
        EPWM_enableTripZoneSignals(myEPWM0_BASE, EPWM_TZ_SIGNAL_DCAEVT1);	
        EPWM_enableTripZoneInterrupt(myEPWM0_BASE, EPWM_TZ_INTERRUPT_DCAEVT1 | EPWM_TZ_INTERRUPT_OST);	
        EPWM_selectDigitalCompareTripInput(myEPWM0_BASE, EPWM_DC_TRIP_COMBINATION, EPWM_DC_TYPE_DCAH);	
        EPWM_enableDigitalCompareTripCombinationInput(myEPWM0_BASE, EPWM_DC_COMBINATIONAL_TRIPIN10 | EPWM_DC_COMBINATIONAL_TRIPIN5 | EPWM_DC_COMBINATIONAL_TRIPIN9, EPWM_DC_TYPE_DCAH);
        EPWM_setTripZoneDigitalCompareEventCondition(myEPWM0_BASE, EPWM_TZ_DC_OUTPUT_A1, EPWM_TZ_EVENT_DCXH_HIGH);
    Make sure to also route the CMPSS signals through the EPWM X-BAR, something like the below:
    	XBAR_setEPWMMuxConfig(myEPWMXBAR5, XBAR_EPWM_MUX04_CMPSS3_CTRIPH);
    	XBAR_enableEPWMMux(myEPWMXBAR5, XBAR_MUX04);
    	
    	XBAR_setEPWMMuxConfig(myEPWMXBAR10, XBAR_EPWM_MUX00_CMPSS1_CTRIPH);
    	XBAR_enableEPWMMux(myEPWMXBAR10, XBAR_MUX00);
    	
    	XBAR_setEPWMMuxConfig(myEPWMXBAR9, XBAR_EPWM_MUX05_CMPSS3_CTRIPL);
    	XBAR_enableEPWMMux(myEPWMXBAR9, XBAR_MUX05);
    For CMPSS1_High Comp (inverted), are you inverting the signal in the CMPSS? The above code is assuming no inversion for any signals. I want to understand where in the system this will occur and based on that we can discuss how to modify the above based on your needs.
    Best Regards,
    Marlyn