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: TRIGGERING ADC SOC FROM DIGITAL COMPARE SUBMODULE AND EPWM OUTPUT

Part Number: TMS320F28075

I would like to trigger and ADC SOC using the Digital Compare whenever the Output of an EPWM goes high. 

As is shown in the code below, GPIO 14 is configured as an EPWM output, I wire GPIO 14 to the Digital Compare module of EPWM8 and then configure the Digital compare module as is shown in the code.

My question is, will this configuration work? i.e. using the Edge filter.

In other examples I have seen in here, the function 

''set_DigitalCompareBlankingzEvent()" is being used. I don't use it in my configuration since I won't be using the Time Base Counter=Period or Time Base Counter=Zero events to start blanking but rather the event from the GPIO going High.  

//SetUp X-BAR
//Using the input X_BAR
XBAR_setInputPin(XBAR_INPUT1, 14);//Select x-bar input being configured and input GPIO pin

XBAR_lockInput(XBAR_INPUT1);//lock input to x-bar input

//Setup Digital compare Submodule
EPWM_selectDigitalCompareTripInput(EPWM8_BASE, EPWM_DC_TRIP_TRIPIN1, EPWM_DC_TYPE_DCAH);//Select DC trip input

EPWM_setTripZoneDigitalCompareEventCondition(EPWM8_BASE, EPWM_TZ_DC_OUTPUT_A1, EPWM_TZ_EVENT_DCXH_HIGH);

EPWM_setDigitalCompareFilterInput(EPWM8_BASE, EPWM_DC_WINDOW_SOURCE_DCAEVT1);

EPWM_disableDigitalCompareWindowInverseMode(EPWM8_BASE);

EPWM_enableDigitalCompareEdgeFilter(EPWM8_BASE);

EPWM_setDigitalCompareEdgeFilterMode(EPWM8_BASE,EPWM_DC_EDGEFILT_MODE_RISING);

EPWM_setDigitalCompareEdgeFilterEdgeCount(EPWM8_BASE, EPWM_DC_EDGEFILT_EDGECNT_1);

EPWM_setDigitalCompareWindowLength(EPWM8_BASE, BLANKING_WINDOW);

EPWM_setDigitalCompareWindowOffset(EPWM8_BASE, 1);

EPWM_enableDigitalCompareBlankingWindow(EPWM8_BASE);

EPWM_setDigitalCompareEventSource(EPWM8_BASE, EPWM_DC_MODULE_A, EPWM_DC_EVENT_1, EPWM_DC_EVENT_SOURCE_FILT_SIGNAL);

EPWM_enableDigitalCompareADCTrigger(EPWM8_BASE, EPWM_DC_MODULE_A);

//Setup Event trigger
EPWM_enableADCTrigger(EPWM8_BASE, EPWM_SOC_A);

EPWM_setADCTriggerSource(EPWM8_BASE, EPWM_SOC_A, EPWM_SOC_DCxEVT1);

//Set ADC SOC
ADC_setupSOC(ADCA_BASE, ADC_SOC_NUMBER0, ADC_TRIGGER_EPWM8_SOCA, ADC_CH_ADCIN0, SAMPLE_HOLD_TIME);

Please advice me if this piece is code is correct for what I am configuring?