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.

TMDSCNCD263: Comp Event SDFM doing nothing

Part Number: TMDSCNCD263

Hello everyone,

I am trying to use the SDFM to create a COMP H event, which then should be output via the OutputXbar. The data filter and comparator filter work without a problem and return the values that I expect. But a COMP event is never generated, even with the comparator data above the threshold. SDFM_getThresholdStatus always returns 0 and the pin of the OutputXBar is always 0 too.

That should be solely a code problem, as I can already read the correct data, so all the pins are correct.

I hope you can help me and thanks in advance!

Best Regards

Til

Here is my code:

uint16_t hlt = 29150U;
uint16_t llt = 0U;

short int FilterData;
uint16_t x;
uint16_t SDFM_status;

void empty_main(void *args)
{

/* Open drivers to open the UART driver for console */
Drivers_open();
Board_driversOpen();

/* Input Control Unit*/

/* Configure Input Control Unit: Modulator Clock rate = Modulator data rate*/

SDFM_setupModulatorClock(CONFIG_SDFM0_BASE_ADDR, SDFM_FILTER_4,
SDFM_MODULATOR_CLK_EQUAL_DATA_RATE);

SDFM_enableSynchronizer(CONFIG_SDFM0_BASE_ADDR, SDFM_FILTER_4, SDFM_CLOCK_SYNCHRONIZER | SDFM_DATA_SYNCHRONIZER);

SDFM_selectClockSource(CONFIG_SDFM0_BASE_ADDR, SDFM_FILTER_4, SDFM_CLK_SOURCE_CHANNEL_CLK);

/* Comparator Unit - over and under value threshold settings*/

//Change Filter Type here
SDFM_configEnhancedComparator(CONFIG_SDFM0_BASE_ADDR, (SDFM_FILTER_4 | SDFM_FILTER_SINC_3 | SDFM_SET_OSR(32)), SDFM_THRESHOLD(hlt,llt), SDFM_THRESHOLD(32767,0), 0);

SDFM_selectCompEventSource(CONFIG_SDFM0_BASE_ADDR, SDFM_FILTER_4 , SDFM_COMP_EVENT_1 , SDFM_COMP_EVENT_SRC_COMPH1);

SDFM_CompEventFilterConfig Digital_Filter;
Digital_Filter.clkPrescale=19;
Digital_Filter.sampleWindow=25;
Digital_Filter.threshold=24;
SDFM_configCompEventHighFilter(CONFIG_SDFM0_BASE_ADDR, SDFM_FILTER_4, &Digital_Filter);
SDFM_initCompEventHighFilter(CONFIG_SDFM0_BASE_ADDR, SDFM_FILTER_4);


SDFM_selectCompEventSource(CONFIG_SDFM0_BASE_ADDR, SDFM_FILTER_4 , SDFM_COMP_EVENT_2 , SDFM_COMP_EVENT_SRC_COMPH2_L2);
/* Configure Comparator Unit's comparator filter type and comparator's
OSR value, higher threshold, lower threshold*/


/* Data Filter Unit*/

/* Configure Data Filter Unit - filter type, OSR value and
enable / disable data filter*/

SDFM_configDataFilter(CONFIG_SDFM0_BASE_ADDR, (SDFM_FILTER_4 | SDFM_FILTER_SINC_3 |
SDFM_SET_OSR(32)), (SDFM_DATA_FORMAT_32_BIT | SDFM_FILTER_ENABLE |
SDFM_SHIFT_VALUE(0x0007))); //Shift Value?

/* Enable Master filter bit: Unless this bit is set none of the filter modules
can be enabled. All the filter modules are synchronized when master filter
bit is enabled after individual filter modules are enabled.*/

SDFM_enableMasterFilter(CONFIG_SDFM0_BASE_ADDR);


// CSL_REG16_WR_RAW(0x5026808a, 0xe19f );

// CSL_REG16_WR_RAW(0x5026809c, 0x043f );


for(;;)
{
FilterData = SDFM_getFilterData(CONFIG_SDFM0_BASE_ADDR, SDFM_FILTER_4);
x = CSL_REG16_RD_RAW(0x50268094); //Comparator Value
SDFM_status = SDFM_getThresholdStatus(CONFIG_SDFM0_BASE_ADDR, SDFM_FILTER_4);
ClockP_usleep(1000000L);
}


Board_driversClose();
Drivers_close();
}