Data Sheet
651
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181G–SAM-D21_Datasheet–09/2015
30. TCC – Timer/Counter for Control Applications
30.1 Overview
The Timer/Counter for Control applications (TCC) consists of a counter, a prescaler, compare/capture channels and
control logic. The counter can be set to count events or clock pulses. The counter together with the compare/capture
channels can be configured to time stamp input events, allowing capture of frequency and pulse-width. It can also
perform waveform generation such as frequency generation and pulse-width modulation.
Waveform extensions are intended for motor control, ballast, LED, H-bridge, power converters, and other types of power
control applications. It enables low- and high-side output with optional dead-time insertion. It can also generate a
synchronized bit pattern across the waveform output pins. The fault options enable fault protection for safe and
deterministic handling, disabling and/or shut down of external drivers.
The Timer/Counter Block diagram (Figure 30-2 on page 652) shows all the features in TCC but table below shows the
configuration of each of the TCCs.
Figure 30-1. TCC Configuration Summary
30.2 Features
z Up to four compare/capture channels (CC) with:
z Double buffered period setting
z Double buffered compare or capture channel
z Circular buffer on period and compare channel registers
z Waveform generation:
z Frequency generation
z Single-slope pulse-width modulation (PWM)
z Dual-slope pulse-width modulation with half-cycle reload capability
z Input capture:
z Event capture
z Frequency capture
z Pulse-width capture
z Waveform extensions:
z Configurable distribution of compare channels outputs across port pins
z Low- and high-side output with programmable dead-time insertion
z Waveform swap option with double buffer support
z Pattern generation with double buffer support
z Dithering support
z Fault protection for safe drivers disabling:
z Two recoverable fault sources
z Two non-recoverable fault sources
z Debugger can be source of non-recoverable fault
z Input event:
z Two input events for counter
TCC#
Channels
(CC_NUM)
Waveform
Output
(WO_NUM)
Counter
size
Fault Dithering
Output
matrix
Dead
Time
Insertion
(DTI)
SWAP
Pattern
generation
0 4 8 24-bit X X X X X X
1 2 4 24-bit X X X
2 2 2 16-bit X