DocID13284 Rev 2 235/564
UM0404 The general purpose timer units
Timer 6 run bit
The timer can be started or stopped by software through bit T6R (Timer T6 Run bit). If
T6R = ‘0’, the timer stops. Setting T6R to ‘1’ will start the timer. In gated timer mode, the
timer will only run if T6R = ‘1’ and the gate is active (high or low, as programmed).
Count direction control
The count direction of the core timer can be controlled either by software, or by the external
input pin T6EUD (Timer T6 External Up/Down Control Input), which is the alternate input
function of port pin P5.10. These options are selected by bit T6UD and T6UDE in control
register T6CON. When the up/down control is done by software (bit T6UDE = ‘0’), the count
direction can be altered by setting or clearing bit T6UD. When T6UDE = ‘1’, pin T6EUD is
selected to be the controlling source of the count direction.
However, bit T6UD can still be used to reverse the actual count direction, as shown in the
Table 38. If T6UD = ‘0’ and pin T6EUD shows a low level, the timer is counting up. With a
high level at T6EUD the timer is counting down. If T6UD = ‘1’, a high level at pin T6EUD
specifies counting up, and a low level specifies counting down. The count direction can be
changed regardless of whether the timer is running or not.
Note: The direction control works the same for core timer T6 and for auxiliary timer T5. Therefore
the pins and bit are named Tx...
T6UDE Timer 6 External Up/Down Enable
(1)
T6OE
Alternate Output Function Enable
T6OE = ‘0’: Alternate Output Function Disabled
T6OE = ‘1’: Alternate Output Function Enabled
T6OTL
Timer 6 Output Toggle Latch
Toggles on each overflow / underflow of T6. Can be set or reset by software.
T6SR
Timer 6 Reload Mode Enable
T6SR = ‘0’: Reload from register CAPREL Disabled
T6SR = ‘1’: Reload from register CAPREL Enabled
1. For the effects of bit T6UD and T6UDE refer to the direction Ta ble 38.
Bit Function
Table 38. GPT2 core timer T6 count direction control
Pin TxEUD Bit TxUDE Bit TxUD Count direction
X 0 0 Count Up
X 0 1 Count Down
0 1 0 Count Up
1 1 0 Count Down
0 1 1 Count Down
1 1 1 Count Up