Datasheet

Table Of Contents
Table 49-1. Timer/Counter for Control Applications - Definitions
Name Description
TOP The counter reaches TOP when it becomes equal to the highest value in
the count sequence. The TOP value can be the same as Period (PER)
or the Compare Channel 0 (CC0) register value depending on the
Waveform Generator mode in 49.6.2.5.1 Waveform Output Generation
Operations.
ZERO The counter reaches ZERO when it contains all zeroes.
MAX The counter reaches maximum when it contains all ones.
UPDATE The timer/counter signals an update when it reaches ZERO or TOP,
depending on the direction settings.
Timer The timer/counter clock control is handled by an internal source.
Counter The clock control is handled externally (e.g., counting external events).
CC For compare operations, the CC are referred to as "compare channels."
For capture operations, the CC are referred to as "capture channels."
Each TCC instance has up to four compare/capture channels (CCx).
The Counter register (COUNT), Period registers with Buffer (PER and PERBUF), and Compare and
Capture registers with buffers (CCx and CCBUFx) are 16- or 24-bit registers, depending on each TCC
instance. Each Buffer register has a Buffer Valid (BUFV) flag that indicates when the buffer contains a
new value.
Under normal operation, the counter value is continuously compared to the TOP or ZERO value to
determine whether the counter has reached TOP or ZERO. In either case, the TCC can generate
interrupt requests or generate events for the Event System. In Waveform Generator mode, these
comparisons are used to set the waveform period or pulse width.
A prescaled generic clock (GCLK_TCCx) and events from the event system can be used to control the
counter. The event system is also used as a source to the input capture.
The Recoverable Fault Unit enables event controlled waveforms by acting directly on the generated
waveforms of the TCC compare channels output. These events can restart, halt the timer/counter period,
shorten the output pulse active time, or disable waveform output as long as the fault condition is present.
This can typically be used for current sensing regulation, and zero-crossing and demagnetization re-
triggering.
The MCE0 and MCE1 asynchronous event sources are shared with the recoverable fault unit. Only
asynchronous events are used internally when fault unit extension is enabled. For further details on how
to configure asynchronous events routing, refer to EVSYS – Event System.
Recoverable fault sources can be filtered and/or windowed to avoid false triggering, for example from I/O
pin glitches, by using digital filtering, input blanking, and qualification options. See also 49.6.3.5
Recoverable Faults.
In order to support applications with different types of motor control, ballast, LED, H-bridge, power
converter, and other types of power switching applications, the following independent units are
implemented in some of the TCC instances as optional and successive units:
SAM D5x/E5x Family Data Sheet
TCC – Timer/Counter for Control Applications
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1803