The Counter period is changed by writing a
new TOP value to the Period (TCAn.PER) register.
No Buffering:Any period update is immediate if not using
double-buffering.
Figure 31-6. Changing the Period Without
Buffering
A counter wrap-around can occur in any mode
of operation when counting up without buffering, as the TCAn.CNT and TCAn.PER registers are
continuously compared. If writing a new TOP value to TCAn.PER lower than the current
TCAn.CNT, the counter will wrap first before a compare match occurs.Figure 31-7. Unbuffered Dual-Slope
Operation
With Buffering: When using
double-buffering, the buffer can be written at any time and still maintain the correct
operation. TCAn.PER is always updated on the UPDATE condition, as shown for dual-slope
operation in the figure below. This prevents wrap-around and the generation of odd
waveforms.Figure 31-8. Changing the Period Using
Buffering
Note: Buffering is used in figures illustrating TCA operation if not otherwise
specified.
The online versions of the documents are provided as a courtesy. Verify all content and data in the device’s PDF documentation found on the device product page.