TC1796
Peripheral Units (Vol. 2 of 2)
General Purpose Timer Array (GPTA)
User’s Manual
24-40
V2.0, 2007-07
GPTA, V2.0
Scalable Signed Greater or Equal Compare
This section (up to
) explains the
classical timer update problem
, and the
solutions supported by the GPTA.
The two Global Timers embedded into the GPTA include a 24-bit greater/equal
comparator. This comparator unit performs compare operations between the GT timer
contents and the data value found on the GPTA-internal data bus (coming from a GTC
compare register update). The goal of this comparator is to be able to perform an action
immediately if the compare cell is updated with a new threshold but the timer has already
passed this value.
gives an example on this greater/equal concept.
Assumption: a timer is running and a new threshold (value T) is set.
The different points Px represent different cases of present time. When at P1 or P2, the
moment represented by T lies in the future and no action is yet required. When at P3 or
P4, the moment represented by T lies in the past, and an action is required immediately.
So, the problem is to determine if the threshold T has been passed or not.
Considering an
infinite counter
, the situation is simple. The evaluation consists in
determining if point P is before or after T.
Considering a
reloaded counter
, as the timer rolls over at its maximum value, the
situation is more complex.
Figure 24-27 Greater/Equal Concept
The
observation window
determines the space in time where writing the value T to the
comparator will lead to correct observation (meaning, there is an event if “After”; there is
no event if “Before”). Considering an observation window, an event (threshold T) is
MCT05936
Time
Reloaded Counter
T P3
P4
P2
P1
Infinite Counter