Main Content

CMPSS

The Comparator Subsystem consists of two modules, Comparator High (COMPH) and Comparator Low (COMPH). Each module generates a high digital output when the voltage on the first input pin (positive input) is greater than the voltage on the second input pin (negative input). And each module generates a low digital output when the voltage on the first input pin (positive input) is less than the voltage on the second input pin (negative input).

The second input pin can either be the external pin or the DAC module.

Configure CMPSS#

Configure the comparator subsystem (CMPSS).

Select this parameter to configure the comparator subsystem (CMPSS). If Configure CMPSS# check box is clear, then the CMPSS modules is configured with default values.

Note

The number of modules available will vary for different processors.

Configure COMP#

Configure the COMPH or COMPL module.

Select this parameter to configure the COMPH or COMPL module. If configure COMP# check box is clear, then the COMPH# module is configured with default values.

Reload condition for RAMP reference value (RAMPLOADSEL)

Reload condition for RAMP reference value.

Determines whether CMPSS Ramp Status Register (RAMPSTS) is updated from Immediate (RAMPMAXREFA) or Shadow (RAMPMAXREFS) when CMPSS Comparator Status Register (COMPSTS) is triggered.

This parameter is available if you are using RAMP module as DAC source for second input pin of the comparator module.

Note

This option is available only for COMPH module.

Invert comparator output

Invert comparator output.

Select this parameter to invert the output of COMP# module.

Enable latch clear by EPWMSYNCPER event

Enable latch clear by EPWMSYNCPER event.

Select this parameter to clear the comparator status latch output by EPWMSYNCPER event.

Configure digital filter

Configure the digital filter for COMP#.

Select this parameter to configure digital filter options sample clock, sample window size and threshold size. If the option is left unchecked, the comparator is configured with default values.

Sample clock prescale [0 to 1023]

Set the sample clock prescale for digital filter of COMP#.

It introduces the given number of system clock cycles between input samples.

Sample window size

Set the sample window size for digital filter of COMP#.

Number of samples monitored in digital filter window.

Threshold sample size

Set the threshold sample window size for digital filter of COMP#.

The THRESH samples of the opposite state must appear within the sample window for the output to change state.

Comparator output type for EPWM X-BAR (CTRIP#SEL)

Select the comparator output type source for COMP#.

The comparator output type for EPWM X-BAR (CTRIP#SEL):

  • Asynchronous output (ASYNCH)

  • Synchronous output (SYNCH)

  • Digital output filter (COMP#STS)

  • Latched output (COMP#LATCH)

  • Asynchronous (ASYNCH) or Latched (COMP#LATCH) output

Comparator output type for OUTPUT X-BAR (CTRIPOUT#SEL)

Select the comparator output type source for COMP#.

The comparator output type for OUTPUT X-BAR (CTRIPOUT#SEL):

  • Asynchronous output (ASYNCH)

  • Synchronous output (SYNCH)

  • Digital output filter (COMP#STS)

  • Latched output (COMP#LATCH)

  • Asynchronous (ASYNCH) or Latched (COMP#LATCH) output

DAC reference voltage

Select the DAC reference voltage for CMPSS.

Determines the voltage supply selected as the reference for comparator DAC. The reference voltage can either be Internal reference voltage (VDDA) or External reference voltage through ADCINB0 (VDAC).

Reload condition for DAC value (SWLOADSEL)

Select the reload condition for DAC value.

Determines the DAC value selected for the software load select. The DAC value can either be System clock (SYSCLK) or External event (EPWMSYNCPER).

EPWM peripheral synchronization event

Select the EPWM peripheral synchronization event.

Select the PWMSYNC event to clear the latched output or reload the RAMP values.

EPWM blank window event

Select the EPWM for blanking window

Determines the leading edge blanking of the comparator module.

Note

This parameter appears only for specific processors.

Comparator hysteresis value

Set the amount of hysteresis on the comparator inputs.

Related Topics