The Counter period is changed by writing a
new TOP value to the Period (TCEn.PER) register.
Changing the Period Without Buffering
When not using Double Buffering, any period update is
immediate.
Figure 23-5. Changing the Period Without
Buffering
A counter wraparound can occur in any
mode of operation when up-counting without buffering. This happens because the TCEn.CNT
and TCEn.PER registers are continuously compared. If a new TOP value is written to
TCEn.PER that is lower than current TCEn.CNT, the counter will wrap first before a
compare match happens.Figure 23-6. Unbuffered Dual-Slope
Operation
Changing the Period Using Buffering
When using Double Buffering, the buffer
can be written at any time and maintain the correct operation. The TCEn.PER is always
updated on the UPDATE condition, as shown for dual-slope operation in
the figure below, preventing wrap-around and the generation of odd waveforms.Figure 23-7. Changing the Period Using
Buffering