TC1796
Peripheral Units (Vol. 2 of 2)
General Purpose Timer Array (GPTA)
User’s Manual
24-77
V2.0, 2007-07
GPTA, V2.0
Cell Enabling on Event
An LTC is enabled by writing (ST byte, word, half-word operation) LTCCTRk.EOA
(Enable-Of-Action) with 0 in Capture Mode or Compare Mode. Because bit EOA is
hardware protected, read-modify-write operations (LDMST, ST.X, SWAP) only enable
the LTC if bit EOA is modified from 1 to 0 in Capture Mode or Compare Mode. If switching
to Timer Mode, the LTC cell is enabled. If in Timer Mode every write operation into bit
0-7 will enable the LTC. Alternatively, an LTC can be enabled by an event in an LTC with
lower index number. For this purpose, the local event function of an LTC must be
disabled by setting LTCCTRk.EOA initially. This will clear LTCCTRk.CEN and now a
local event cannot affect the LTC. When a preceding LTC generates and communicates
an event (or OIA) via the communication link M1O/M0O, at least one of the M1I/M0I input
lines changes its state to 1. This condition clears bit LTCCTRk.EOA of the disabled LTC
via the OR gate as shown in
. Now LTCCTRk.CEN is set and the LTC is
enabled for local events.
It is also possible to enable the following LTC via the communication link for local events.
For this purpose, the bit LTCCTRk.EOA of this cell must be set, too. If bit
LTCCTRk.OCM2 of the preceding cell is 1, the enable action will take place at the same
time as in the preceding cell. Otherwise, the LTC will be enabled later on a
capture/compare event in the preceding LTC, provided LTCCTRk.OCM0 or
LTCCTRk.OCM1 of this cell is different from 0.
In this way, several LTCs can be enabled at the same time or one after the other.
Normally, the LTCs will be used in One Shot Mode, and a service request will be
generated after the last event to evaluate the data and to prepare the next enable
sequence.
A disabled LTC (LTCCTRk.CEN = 0) behaves as an inactive capture LTC.
Logical Operating Units
The inter-cell communication architecture allows concatenation of several LTCs to a
logical unit. A logical unit contains any number of LTCs communicating via M1 and M0
lines and ends at an LTC disabled for action input or transfer (such as an LTC configured
as timer, reset timer or LTC initiated with LTCCTRk.OCM2 = 0).
Therefore, the LTC with the lowest order number should be configured in Reset Timer
Mode, thus providing all other LTCs of the logical unit with a time base (YO) and a
compare enable signal (SO). Another LTC of the same logical unit can be initiated in
Compare Mode to reset the LTC via its event output line EO, when a programmed
threshold value is reached (register LTCXR) and the current state of its select line input
SI matches the condition selected by the LTCCTRk bits SOH/SOL. Additional LTCs of
the same logical unit can operate in Capture Mode triggered by a rising edge, falling
edge, or both edges of a GPTA input line or a clock line of the clock bus. On the
generated event, these LTCs capture the current contents of the timer cell, can generate