General-Purpose Timers
Continuous-Up/Down Counting
Continuous
Continuous
-
-
Up/Down Counting Mode
Up/Down Counting Mode
CPUCLK
CPUCLK
0
0
1
1
2
2
3
3
TxCNT
TxCNT
Reg.
Reg.
2
2
1
1
0
0
1
1
2
2
0
0
3
3
2
2
1
1
TxPWM
TxPWM
/
/
TxCMP
TxCMP
(active high)
(active high)
This example:
This example:
TxCON.3
TxCON.3
-
-
2 = 01 (reload
2 = 01 (reload
TxCMPR
TxCMPR
on underflow or period match)
on underflow or period match)
TxPR
TxPR
= 3
= 3
TxCMPR
TxCMPR
= 1 (initially)
= 1 (initially)
Prescale
Prescale
= 1
= 1
TxCMPR
TxCMPR
loads
loads
with a 1
with a 1
TxCMPR
TxCMPR
loads
loads
with a 2
with a 2
TxCMPR
TxCMPR
loads
loads
with a 1
with a 1
(Used for Symmetric PWM Waveforms)
(Used for Symmetric PWM Waveforms)
♦
♦
Seemless
Seemless
up/down repetition
up/down repetition
♦
♦
Up/down count period is 2*
Up/down count period is 2*
TxPR
TxPR
The procedure for GP Timer Continuous-Up/Down Counting is as follows:
User sets bit 6 of TxCON register high to initiate counting
Counting begins on next rising clock edge
− 1
st
count is a “Zero” (no increment)
Count up until match with period register then backwards to zero
If counter > period counts up to FFFFh then resets to zero and start as if the initial counter value
were zero
C28x - Event Manager 7 - 11