Timer_A Operation
791
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Timer_A
19.2.4.1.1 Capture Initiated by Software
Captures can be initiated by software. The CMx bits can be set for capture on both edges. Software then
sets CCIS1 = 1 and toggles bit CCIS0 to switch the capture signal between V
CC
and GND, initiating a
capture each time CCIS0 changes state:
NOTE:
Capture Initiated by Software
In general, changing capture inputs while in capture mode may cause unintended capture
events. For this scenario, switching the capture input between VCC and GND, disabling the
capture mode is not required.
19.2.4.2 Compare Mode
The compare mode is selected when CAP = 0. The compare mode is used to generate PWM output
signals or interrupts at specific time intervals. When TAxR
counts
to the value in a TAxCCRn, where n
represents the specific capture/compare register.
•
Interrupt flag CCIFG is set.
•
Internal signal EQUn = 1.
•
EQUn affects the output according to the output mode.
•
The input signal CCI is latched into SCCI.
19.2.5 Output Unit
Each capture/compare block contains an output unit. The output unit is used to generate output signals,
such as PWM signals. Each output unit has eight operating modes that generate signals based on the
EQU0 and EQUn signals.
19.2.5.1 Output Modes
The output modes are defined by the OUTMOD bits (see
). The OUTn signal is changed with
the rising edge of the timer clock for all modes except mode 0. Output modes 2, 3, 6, and 7 are not useful
for output unit 0 because EQUn = EQU0.
Table 19-2. Output Modes
OUTMODx
Mode
Description
000
Output
The output signal OUTn is defined by the OUT bit. The OUTn signal updates immediately
when OUT is updated.
001
Set
The output is set when the timer
counts
to the TAxCCRn value. It remains set until a reset
of the timer, or until another output mode is selected and affects the output.
010
Toggle/Reset
The output is toggled when the timer
counts
to the TAxCCRn value. It is reset when the
timer
counts
to the TAxCCR0 value.
011
Set/Reset
The output is set when the timer
counts
to the TAxCCRn value. It is reset when the timer
counts
to the TAxCCR0 value.
100
Toggle
The output is toggled when the timer
counts
to the TAxCCRn value. The output period is
double the timer period.
101
Reset
The output is reset when the timer
counts
to the TAxCCRn value. It remains reset until
another output mode is selected and affects the output.
110
Toggle/Set
The output is toggled when the timer
counts
to the TAxCCRn value. It is set when the timer
counts
to the TAxCCR0 value.
111
Reset/Set
The output is reset when the timer
counts
to the TAxCCRn value. It is set when the timer
counts
to the TAxCCR0 value.