Datasheet

Table Of Contents
34
XMEGA E5 [DATASHEET]
Atmel-8153J–AVR-ATxmega8E5-ATxmega16E5-ATxmega32E5_Datasheet–11/2014
17. Timer Counter Type 4 and 5
17.1 Features
Three 16-bit timer/counter
One timer/counter of type 4
Two timer/counter of type 5
32-bit timer/counter support by cascading two timer/counters
Up to four compare or capture (CC) channels
Four CC channels for timer/counters of type 4
Two CC channels for timer/counters of type 5
Double buffered timer period setting
Double buffered CC channels
Waveform generation modes:
Frequency generation
Single-slope pulse width modulation
Dual-slope pulse width modulation
Input capture:
Input capture with noise cancelling
Frequency capture
Pulse width capture
32-bit input capture
Timer overflow and error interrupts/events
One compare match or input capture interrupt/event per CC channel
Can be used with event system for:
Quadrature decoding
Count and direction control
Input capture
Can be used with EDMA and to trigger EDMA transactions
High-resolution extension
Increases frequency and waveform resolution by 4x (2-bit) or 8x (3-bit)
Waveform extension
Low- and high-side output with programmable dead-time insertion (DTI)
Fault extention
Event controlled fault protection for safe disabling of drivers
17.2 Overview
Atmel AVR XMEGA devices have a set of flexible, 16-bit timer/counters (TC). Their capabilities include accurate program
execution timing, frequency and waveform generation, and input capture with time and frequency measurement of digital
signals. Two timer/counters can be cascaded to create a 32-bit timer/counter with optional 32-bit input capture.
A timer/counter consists of a base counter and a set of compare or capture (CC) channels. The base counter can be
used to count clock cycles or events. It has direction control and period setting that can be used for timing. The CC
channels can be used together with the base counter to do compare match control, frequency generation, and pulse
width modulation (PWM) generation, as well as various input capture operations. A timer/counter can be configured for
either capture, compare, or capture and compare function.
A timer/counter can be clocked and timed from the peripheral clock with optional prescaling, or from the event system.
The event system can also be used for direction control, input capture trigger, or to synchronize operations.