English
Language : 

SAM4S_14 Datasheet, PDF (829/1231 Pages) ATMEL Corporation – ARM-based Flash MCU
37. Timer Counter (TC)
37.1
Description
The Timer Counter (TC) includes 3 identical 16-bit Timer Counter channels.
Each channel can be independently programmed to perform a wide range of functions including frequency
measurement, event counting, interval measurement, pulse generation, delay timing and pulse width modulation.
Each channel has three external clock inputs, five internal clock inputs and two multi-purpose input/output signals
which can be configured by the user. Each channel drives an internal interrupt signal which can be programmed to
generate processor interrupts.
The Timer Counter (TC) embeds a quadrature decoder logic connected in front of the timers and driven by TIOA0,
TIOB0 and TIOB1 inputs. When enabled, the quadrature decoder performs the input lines filtering, decoding of
quadrature signals and connects to the timers/counters in order to read the position and speed of the motor
through the user interface.
The Timer Counter block has two global registers which act upon all TC channels:
 Block Control Register (TC_BCR)—allows channels to be started simultaneously with the same instruction
 Block Mode Register (TC_BMR)—defines the external clock inputs for each channel, allowing them to be
chained
Table 37-1 gives the assignment of the device Timer Counter clock inputs common to Timer Counter 0 to 2.
Table 37-1. Timer Counter Clock Assignment
Name
Definition
TIMER_CLOCK1
MCK/2
TIMER_CLOCK2
MCK/8
TIMER_CLOCK3
MCK/32
TIMER_CLOCK4
TIMER_CLOCK5(1)
MCK/128
SLCK
Note: 1. When Slow Clock is selected for Master Clock (CSS = 0 in PMC Master Clock Register), TIMER_CLOCK5 input
is equivalent to Master Clock.
37.2
Embedded Characteristics
 Provides 3 16-bit Timer Counter channels
 Wide range of functions including:
̶ Frequency measurement
̶ Event counting
̶ Interval measurement
̶ Pulse generation
̶ Delay timing
̶ Pulse Width Modulation
̶ Up/down capabilities
̶ Quadrature decoder logic
̶ 2-bit gray up/down count for stepper motor
 Each channel is user-configurable and contains:
̶ Three external clock inputs
̶ Five Internal clock inputs
SAM4S Series [DATASHEET]
Atmel-11100G-ATARM-SAM4S-Datasheet_27-May-14
829