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: CMPSS not working

Part Number: TMDSCNCD263

Hello everyone,

I am trying to implement the CMPSS module for a project. To get started I just want to get a simple project running in CCS which solely compares an analog input voltage and returns the result of the comparison on a GPIO Pin (LED) via the XBAR. I used the example from the sdk as well, but the CMPSS always returns both low and high comparisons are true. CMPSS_getStatus(uint32_t base) always returns 0x0303 which means both the low and high comparison are true.

My CMPSSA2 settings are: CMP enabled, Negative Input driven by internal DAC, High Comparison DAC Value 2048, no digital filter or ramp, positive Input driven by external INH that is Pin12 on the HSEC Connector. Rest is default.

Then I use the Output XBAR to output the signal on the R3 Pin / GPIO1(Green LED). Source of the XBAR is the CMPSSA2 CTRIPH Event. Rest is default. I also tried other Pins as output and measured with the Multimeter but the same happens.

I supply Pin12 with power via the baseboard TMDSCHNHSECDOCK and change the voltage for Pin12 between 0V and 3V but the LED is always turned on.

My Code just is for(;;){Cmp_status = CMPSS_getStatus(CONFIG_CMPSS0_BASE_ADDR);} (plus the standard includes and Board_open and stuff)

Do you have any idea what I can do to get the CMP running?

Thanks in advance!

  • Hi

    The CMPSSA2 instance you have taken specifies the following ADCs:

    Please verify if it is the right ADC Pin:

    These ADC1_AIN0 --> pin 12 in Control Card E2, and ADC1_AIN0 --> pin 18 on control card E1.

    Could you specify which control card are you using?

    One of the approaches is to view the ADC Result Register value and verify if its greater than 2048:

    We can debug this by checking the value of ADC1_AIN0.

    You can Configure ADC Start of Conversion (SOC) and then you can use the ADC Result API to print ADC value to check if it is greater than 2048.

    This is the most reliable solution.

    Another approach is to ground the ADC Pin:

    Grounding the ADC pin connected to CMPSS. This will make sure the ADC value is definitely 0, and is not greater than 2048.

    This should make the CMPSSA2 TripH value to be 0.

    Check the CMPSS Syscfg configuration:

    check if the CMPSS module is enabled in syscfg.

    Check if the output of CMPSS Trip is selected as async and NOT latched output.

    check if the output is NOT inverted.

    Hope this helps to debug the issue.

    Thanks & Regards

    Sri Vidya