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!