169
8331B–AVR–03/12
Atmel AVR XMEGA AU
There are two differences between timer/counter type 0 and type 1. Timer/counter 0 has four CC
channels, and timer/counter 1 has two CC channels. All information related to CC channels 3
and 4 is valid only for timer/counter 0. Only Timer/Counter 0 has the split mode feature that split
it into 2 8-bit Timer/Counters with four compare channels each.
Some timer/counters have extensions to enable more specialized waveform and frequency gen-
eration. The advanced waveform extension (AWeX) is intended for motor control and other
power control applications. It enables low- and high-side output with dead-time insertion, as well
as fault protection for disabling and shutting down external drivers. It can also generate a syn-
chronized bit pattern across the port pins. The high-resolution (hi-res) extension can be used to
increase the waveform output resolution by four or eight times by using an internal clock source
running up to four times faster than the peripheral clock.
A block diagram of the 16-bit timer/counter with extensions and closely related peripheral mod-
ules (in grey) is shown in
Figure 14-1.
16-bit timer/counter and closely related peripherals.
14.2.1
Definitions
The following definitions are used throughout the documentation:
In general, the term “timer” is used when the timer/counter clock control is handled by an internal
source, and the term “counter” is used when the clock control is handled externally (e.g. count-
ing external events). When used for compare operations, the CC channels are referred to as
AWeX
Compare/Capture Channel D
Compare/Capture Channel C
Compare/Capture Channel B
Compare/Capture Channel A
Waveform
Generation
Buffer
Comparator
Hi
-R
es
Fault
Protection
Capture
Control
Base Counter
Counter
Control Logic
Timer Period
Prescaler
Dead-Time
Insertion
Pattern
Generation
clk
PER4
POR
T
S
Event
System
clk
PER
Timer/Counter
Table 14-1.
Timer/counter definitions.
Name
Description
BOTTOM
The counter reaches BOTTOM when it becomes zero.
MAX
The counter reaches MAXimum when it becomes all ones.
TOP
The counter reaches TOP when it becomes equal to the highest value in the count
sequence. The TOP value can be equal to the period (PER) or the compare channel
A (CCA) register setting. This is selected by the waveform generator mode.
UPDATE
The timer/counter signals an update when it reaches BOTTOM or TOP, depending on
the waveform generator mode.