Dual Slope Mode

In Dual Slope mode, a TCD cycle consists of the TCD counter counting down from CMPBCLR value to zero, and up again to the CMPBCLR value. This gives a TCD cycle period:

TTCD_cycle=2×(CMPBCLR+1)fCLK_TCD_CNT

The WOA output is set when the TCD counter counts up and matches the CMPASET value. WOA is cleared when the TCD counter counts down and matches the CMPASET value.

The WOB output is set when the TCD counter counts down and matches the CMPBSET value. WOB is cleared when the TCD counter counts up and matches the CMPBSET value.
Figure 1. Dual Slope Mode

The outputs will be overlapping if CMPBSET > CMPASET.

CMPACLR is not used in Dual Slope mode. Writing a value to CMPACLR has no effect.

When starting the TCD in Dual Slope mode, the TCD counter starts at the CMPBCLR value and counts down. The WOA will not be set before the end of the first TCD cycle.

Figure 2. Dual Slope Mode Starting and Stopping