29.8.4 Low-pass filterThe low-pass filter operates on the unfiltered and unsynchronized and optionally invertedcomparator output COUTA and generates the filtered and synchronized output COUT.Both COUTA and COUT can be configured as module outputs and are used for differentpurposes within the system.Synchronization and edge detection are always used to determine status register bitvalues. They also apply to COUT for all sampling and windowed modes. Filtering can beperformed using an internal timebase defined by FPR[FILT_PER], or using an externalSAMPLE input to determine sample time.The need for digital filtering and the amount of filtering is dependent on userrequirements. Filtering can become more useful in the absence of an external hysteresiscircuit. Without external hysteresis, high-frequency oscillations can be generated atCOUTA when the selected INM and INP input voltages differ by less than the offsetvoltage of the differential comparator.29.8.4.1 Enabling filter modesFilter modes can be enabled by:• Setting CR0[FILTER_CNT] > 0x01 and• Setting FPR[FILT_PER] to a nonzero value or setting CR1[SE]=1If using the divided bus clock to drive the filter, it will take samples of COUTA everyFPR[FILT_PER] bus clock cycles.The filter output will be at logic 0 when first initalized, and will subsequently changewhen all the consecutive CR0[FILTER_CNT] samples agree that the output value haschanged. In other words, SCR[COUT] will be 0 for some initial period, even whenCOUTA is at logic 1.Setting both CR1[SE] and FPR[FILT_PER] to 0 disables the filter and eliminatesswitching current associated with the filtering process.NoteAlways switch to this setting prior to making any changes infilter parameters. This resets the filter to a known state.Switching CR0[FILTER_CNT] on the fly without thisintermediate step can result in unexpected behavior.Chapter 29 Comparator (CMP)KL04 Sub-Family Reference Manual, Rev. 3.1, November 2012Freescale Semiconductor, Inc. 485