I am not sure how to connect the positive input of a CMPSS comparator to a particular GPIO pin. I have read the manual and understand how the peripheral works. But the connection of the positive input of the comparator to a particular GPIO pin is not still clear.
In the example cmpss_ex1_asynch.c, there was no code in the void initCMPSS(void) to do this. This code is below
void initCMPSS(void)
{
//
// Enable CMPSS and configure the negative input signal to come from
// the DAC
//
CMPSS_enableModule(CMPSS1_BASE);
CMPSS_configHighComparator(CMPSS1_BASE, CMPSS_INSRC_DAC);
//
// Use VDDA as the reference for the DAC and set DAC value to midpoint for
// arbitrary reference.
//
CMPSS_configDAC(CMPSS1_BASE, CMPSS_DACREF_VDDA | CMPSS_DACVAL_SYSCLK |
CMPSS_DACSRC_SHDW);
CMPSS_setDACValueHigh(CMPSS1_BASE, 2048);
//
// Configure the output signals. Both CTRIPH and CTRIPOUTH will be fed by
// the asynchronous comparator output.
//
CMPSS_configOutputsHigh(CMPSS1_BASE, CMPSS_TRIP_ASYNC_COMP |
CMPSS_TRIPOUT_ASYNC_COMP);
//
// Setup the Output X-BAR to output CTRIPOUTH on OUTPUTXBAR3
//
XBAR_setOutputMuxConfig(XBAR_OUTPUT3, XBAR_OUT_MUX00_CMPSS1_CTRIPOUTH);
XBAR_enableOutputMux(XBAR_OUTPUT3, XBAR_MUX00);
}
Do I assume that the default values "0" which correspond to PIN 9 was used? Or the configuration for this is located in another code section.
Is this the function that does the configuration
ASysCtl_selectCMPHPMux ( ASysCtl_CMPHPMuxSelect select, uint32_t value )?
Thanks