TC1796
Peripheral Units (Vol. 2 of 2)
General Purpose Timer Array (GPTA)
User’s Manual
24-58
V2.0, 2007-07
GPTA, V2.0
Capture Mode
The capture function of a GTCk cell is performed on a rising edge (GTCCTRk.RED = 1),
a falling edge (GTCCTRk.FED = 1) or both edges of the selected GTCkIN input signal.
On the requested event, the GTC:
•
Copies the 24-bit value of the selected Global Timer into the 24-bit capture/compare
register GTCXkR.X,
•
Sets the GTCk service request flag in register SRSS1/SRSC1,
•
Activates the service request output SQSk if control register bit GTCCTRk.REN = 1,
•
Performs a GTCkOUT output signal line manipulation (set, reset, toggle, unchanged)
as defined by bit field GTCCTRk.OCM,
•
Transfers an action request, generated by an internal event or received on the M1I,
M0I input lines, to the M1O, M0O output lines.
Compare Mode
In the Compare Mode of a GTCk cell, several functions can be performed when the value
of the selected Global Timer matches and/or exceeds the value stored in register
GTCXR. With GTCCTRk.GES = 0 an “Equal Compare” match is selected while
GTCCTRk.GES = 1 selects a “Greater Equal Compare” match. On the requested event,
the GTC:
•
Sets the GTCk service request flag in register SRSS1/SRSC1,
•
Activates service request output SQSk if control register bit GTCCTRk.REN = 1,
•
Performs a GTCkOUT output signal line manipulation (set, reset, toggle, unchanged)
as defined by bit field GTCCTRk.OCM,
•
Transfers an action request, generated by an internal event or received on the M1I,
M0I input lines, to the M1O, M0O output lines.
If a greater or equal compare is selected, the condition is evaluated only when the
compare value is written to the GTCXRk register. The user should then ensure that the
GTC is already enabled so that the evaluation can take place.
Capture after Compare Mode
When bit GTCCTRk.CAC = 1 and a compare event has occurred, register GTCXR is
loaded with:
•
The Global Timer value as selected by bit field GTCCTRk.MOD
(GTCCTRk.CAT = 0),
•
The alternate Global Timer value (GTCCTRk.CAT = 1). If a greater or equal compare
match has been detected, the GTCk should be set into One Shot Mode in order to
prevent double capturing.