Comparator
A
B
Output
COMPx
+
±
Qualification
~100 k
VDDA
10-bit
DAC
VDDA
EPWM
Trip Zone
GPIO Mux
1
0
0
1
SYSCLK
0
1
COMPxA Pin
COMPxB Pin
COMPCTL[COMPSOURCE]
High-Z
COMPHYSTCTL[COMPx_HYST_DISABLE]
COMPCTL[CMPINV]
DACVAL[9:0]
COMPCTL[SYNCSEL]
COMPCTL[QUALSEL]
0
1
VSSA
VSSA
COMPSTS
GPIO Mux
External Pin
Connection
Comparator Block
902
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
Analog Subsystem
10.4.2 Comparator Block Diagram
Figure 10-53. Comparator Block Diagram
NOTE:
Comparator hysteresis feedback is enabled by default and may interfere with high
impedance input signals.
10.4.3 Comparator Function
The comparator in each comparator block is an analog comparator module, and as such its output is
asynchronous to the system clock. The truth table for the comparator is shown in
.
Figure 10-54. Comparator
Table 10-35. Comparator Truth Table
Voltages
Output
Voltage A > Voltage B
1
Voltage B > Voltage A
0
There is no definition for the condition Voltage A = Voltage B since there is hysteresis in the response of
the comparator output. Refer to the device datasheet for the value of this hysteresis. This also limits the
sensitivity of the comparator output to noise on the input voltages.
The output state of the comparator, after qualification, is reflected by the COMPSTS bit in the COMPSTS
register. Since this bit is part of the wrapper, clocks must be enabled to the comparator block for the
COMPSTS bit to actively show the comparator state.
10.4.4 DAC Reference
Each comparator block contains a 10-bit voltage DAC reference that can used to supply the inverting input
(B side input) of the comparator. The voltage output of the DAC is controlled by the DACVAL bit field in
the DACVAL register. The output of the DAC is given by the equation: