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.

TIDM-HV-1PH-DCAC: What causes TRIP5?

Part Number: TIDM-HV-1PH-DCAC
Other Parts Discussed in Thread: C2000WARE

The code in hv1phdcac_board.c  at lines 596-615 (in setupBoardProtection()) configures TRIP5 to trip PWM1B and PWM2B:

 EPWM_selectDigitalCompareTripInput(INV_PWM1_BASE, EPWM_DC_TRIP_TRIPIN5, EPWM_DC_TYPE_DCBH);
  EPWM_setTripZoneDigitalCompareEventCondition(INV_PWM1_BASE, EPWM_TZ_DC_OUTPUT_B1,
                                               EPWM_TZ_EVENT_DCXH_HIGH);
  EPWM_setDigitalCompareEventSource(INV_PWM1_BASE, EPWM_DC_MODULE_B, EPWM_DC_EVENT_1,
                                    EPWM_DC_EVENT_SOURCE_ORIG_SIGNAL);
  EPWM_setDigitalCompareEventSyncMode(INV_PWM1_BASE, EPWM_DC_MODULE_B, EPWM_DC_EVENT_1,
                                      EPWM_DC_EVENT_INPUT_SYNCED);
  EPWM_enableTripZoneSignals(INV_PWM1_BASE, EPWM_TZ_SIGNAL_DCBEVT1);

  EPWM_selectDigitalCompareTripInput(INV_PWM2_BASE, EPWM_DC_TRIP_TRIPIN5, EPWM_DC_TYPE_DCBH);
  EPWM_setTripZoneDigitalCompareEventCondition(INV_PWM2_BASE, EPWM_TZ_DC_OUTPUT_B1,
                                               EPWM_TZ_EVENT_DCXH_HIGH);
  EPWM_setDigitalCompareEventSource(INV_PWM2_BASE, EPWM_DC_MODULE_B, EPWM_DC_EVENT_1,
                                    EPWM_DC_EVENT_SOURCE_ORIG_SIGNAL);
  EPWM_setDigitalCompareEventSyncMode(INV_PWM2_BASE, EPWM_DC_MODULE_B, EPWM_DC_EVENT_1,
                                      EPWM_DC_EVENT_INPUT_SYNCED);
  EPWM_enableTripZoneSignals(INV_PWM2_BASE, EPWM_TZ_SIGNAL_DCBEVT1);

However, I couldn't find any code that sets up an input for TRIP5 (TRIP4 is set up to come from a CMPSS or SDFM filter comparator).

What is the source of TRIP5 (or should this code also use TRIP4)?

  • Hi,

    What S/W version are you currently using now?

    I found the comment for TRIP 5 (hv1phdcac_board.c) in t he latest S/W.

    Please let me know if you still have the question.

        //Trip 4 is the input to the DCAHCOMPSEL
        EPWM_selectDigitalCompareTripInput(INV_PWM1_BASE,EPWM_DC_TRIP_TRIPIN4, EPWM_DC_TYPE_DCAL);
        //Trip 5 is the input to the DCALCOMPSEL
        EPWM_selectDigitalCompareTripInput(INV_PWM1_BASE,EPWM_DC_TRIP_TRIPIN5, EPWM_DC_TYPE_DCAH);



  • This is from the C2000Ware DigitalPower SDK 3.00.00.00:

      // $TI Release: HV_1PH_DCAC v3.00.00.00 $
      // $Release Date: Sat Mar 28 01:36:49 CDT 2020 $

    I just downloaded the latest (3.00.01.00) version and looked at the same file (solutions/tidm_hv_1ph_dcac/f2837x/voltagesourceinvlcfltr/hv1phdcac_board.c)

    The source code of this file is the same as in the revision I quoted above.

    It appears that the only change to the file is the file header, which changed the copyright language.

  • I checked with the SW expert regarding the TRIP4 and TRIP5.

    The original intention was to have TRIP4 for CMPSS and TRIP5 to be SDFM based trip.

    However, TRIP5/SDFM trip is currently disabled because it can result in spurious trips due to noise.  

    Best,
    John

  • Hi John,

    You said:

    John_K said:
    However, TRIP5/SDFM trip is currently disabled because it can result in spurious trips due to noise.

     

    In this file, the SDFM trip is in fact being used if you choose to use the SDFM converters. This uses TRIPIN4 to turn off PWM1A and PWM2A on an over-current condition. The code just prior to the code I quoted above reads:

    	else if(current_sense==2)
    	{
            //// NOTE: USE SDFM_configComparator function
    		// SDFM Filter 2 is used to sense the output current
    		// max range is 16Amps, for a current trip of 8 Amps use
    		// HLT= (32768/2)+ (16384/16)*8
    		// HLT= (32768/2)- (16384/16)*8
    		SDFM_setComparatorFilterType(IO_SDFM_BASE,IO_SDFM_FILTER,SDFM_FILTER_SINC_3);
    		SDFM_setCompFilterOverSamplingRatio(IO_SDFM_BASE,IO_SDFM_FILTER,31);
    		SDFM_setCompFilterHighThreshold(IO_SDFM_BASE,IO_SDFM_FILTER,((32768/2)+(int16_t)((float32_t)current_limit*(float32_t)16384/(float32_t)current_max_sense)));
    		SDFM_setCompFilterLowThreshold(IO_SDFM_BASE,IO_SDFM_FILTER,((32768/2)-(int16_t)((float32_t)current_limit*(float32_t)16384/(float32_t)current_max_sense)));
    
    		SDFM_clearInterruptFlag(IO_SDFM_BASE,0x8000FFFF);
    
    		XBAR_setEPWMMuxConfig(XBAR_TRIP4,IO_SDFM_SENSE_XBAR_MUX_VAL); // select the 2nd option of MUx 18
    
            // Enables mux value of IO to be passed to X-BAR trip signal to generate TRIP
    		XBAR_enableEPWMMux(XBAR_TRIP4, IO_SDFM_SENSE_XBAR_MUX);
    
    	}
    
    	//Trip 4 is the input to the DCAHCOMPSEL
    	EPWM_selectDigitalCompareTripInput(INV_PWM1_BASE,EPWM_DC_TRIP_TRIPIN4, EPWM_DC_TYPE_DCAH);
    	EPWM_setTripZoneDigitalCompareEventCondition(INV_PWM1_BASE,EPWM_TZ_DC_OUTPUT_A1,EPWM_TZ_EVENT_DCXH_HIGH);
    	EPWM_setDigitalCompareEventSource(INV_PWM1_BASE,EPWM_DC_MODULE_A,EPWM_DC_EVENT_1,EPWM_DC_EVENT_SOURCE_ORIG_SIGNAL);
    	EPWM_setDigitalCompareEventSyncMode(INV_PWM1_BASE,EPWM_DC_MODULE_A ,EPWM_DC_EVENT_1,EPWM_DC_EVENT_INPUT_SYNCED);
    	EPWM_enableTripZoneSignals(INV_PWM1_BASE,EPWM_TZ_SIGNAL_DCAEVT1);
    
    	EPWM_selectDigitalCompareTripInput(INV_PWM2_BASE,EPWM_DC_TRIP_TRIPIN4, EPWM_DC_TYPE_DCAH);
    	EPWM_setTripZoneDigitalCompareEventCondition(INV_PWM2_BASE,EPWM_TZ_DC_OUTPUT_A1,EPWM_TZ_EVENT_DCXH_HIGH);
    	EPWM_setDigitalCompareEventSource(INV_PWM2_BASE,EPWM_DC_MODULE_A,EPWM_DC_EVENT_1,EPWM_DC_EVENT_SOURCE_ORIG_SIGNAL);
    	EPWM_setDigitalCompareEventSyncMode(INV_PWM2_BASE,EPWM_DC_MODULE_A ,EPWM_DC_EVENT_1,EPWM_DC_EVENT_INPUT_SYNCED);
    	EPWM_enableTripZoneSignals(INV_PWM2_BASE,EPWM_TZ_SIGNAL_DCAEVT1);
    

    However, PWM1B and PWM2B are not being tripped with TRIPIN4, as the code I quoted initially shows.

    The question of whether using SDFM comparators to trip the PWMs due to an over-current condition is a good idea is an important one, but is not relevant to my question. To re-state my question:

    Given that TRIPIN4 is configured to come from the SDFM comparator, and that it is used to trip PWM1A and PWM2A, couldn't it also be used to trip PWM1B and PWM2B?

    In other words, wouldn't it work to change TRIPIN5 to TRIPIN4 in the code I quoted initially?

  • Ned,

    Yes, TRIP5 should not be enabled when the SDFM sensing is selected. In your earlier code snippet, please change the TRIP5 references to TRIP4. Please do let me know if this resolves the issue.

    Regards,

    Ozino