I would like to use the block diagram as reference to be as clear as possible.
Please notice there is the CMP module, you can get from this comparator module 2 outputs: simple comparison result CMPO or generate an interrupt IRQ depending on the window and filter control (sample input).
In the inputs for the CMP module you will notice you have 2 mux from ANMUX module, here you will choose your 2 inputs from signals listed below, for select signals you should go to the 38.7.6 MUX Control Register (CMPx_MUXCR), for the INP use the PSEL (Plus Input MUX Control) field and for INM use the MSEL (Minus Input MUX Control) field:
- Reference 0 - IN0
- Reference 1 - IN1
- Reference 2 - IN2
- Reference 3 - IN3
- Reference 4 - IN4
- Reference 5 - IN5
- Reference 6 - IN6
- DAC Output - IN7
If you chose to use the IN7 or DAC Output ou should configure the DAC to use it.

Please take a look on the 38.8 CMP Functional Description in the K60P144M150SF3RM reference manual.
Have a nic day :P,
Perla
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------