5 Dithering Feature

The Timer/Counter type D (TCD) is equipped with a dithering feature. If it is not possible to achieve the desired frequency, dithering can be used to approximate the desired frequency and reduce the waveform drift. The dither accumulates the fractional error of the counter clock for each cycle. When the fractional error overflows, an additional clock cycle is added to the selected part of the TCD cycle.

An MCC generated code example for AVR128DA48, which emphases the dithering feature of the TCD, can be found here: