Public Version
www.ti.com
General-Purpose Timers
Table 16-10. Prescaler Clock Ratio Values (continued)
GPTi.
[5] PRE
GPTi.
[4:2] PTV
Divisor (PS)
1
5
64
1
6
128
1
7
256
Thus, the timer overflow-rate is expressed as:
OVF_Rate = (0xFFFF FFFF - GPTn.
+ 1) * (timer-functional clock period) * PS
With (timer-functional clock period) = 1 / (timer-functional clock frequency) and PS = 2
(PTV + 1)
if prescaler is
enabled, or PS = 1 if prescaler is disabled.
CAUTION
Internal resynchronization causes any write to the GPTn.
[1] ST bit to
have some latency before the register is updated:
2.5 * functional clock cycles write_GPTn.TCLR_latency 3.5 * functional clock
cycles
Remember to take this latency into account whenever the timer must be started
or stopped by a software change to the GPTn.
[1] ST bit.
CAUTION
•
In the non-PWM mode, GTPi.
must be maintained at less than or
equal to 0xFFFF FFFE.
•
In the PWM mode, GTPi.
must be maintained at less than or equal to
0xFFFF FFFD.
For example, with a timer clock input of 32 kHz and a GPTn.
[5] PRE field equal to 0, the timer
output period is as listed in
Table 16-11. Value and Corresponding Interrupt Period
GPTi.
[31:0] LOAD_VALUE
Interrupt Period
0x0000 0000
39 h
0xFFFF 0000
2.1 s
0xFFFF FFF0
524
m
s
0xFFFF FFFE
65.5
m
s
16.2.5 Timer Under Emulation
During emulation mode, the timer continues to run according to the value of the GPTi.
[5]
EMUFREE bit.
If the GPTi.
[5] EMUFREE bit is set to 1, timer execution is not stopped in emulation mode
and the interrupt is still generated when overflow or match is reached.
If the GPTi.
[5] EMUFREE bit is set to 0, the prescaler and timer are frozen and both resume
on exit from emulation mode. The asynchronous external input pin (gpti_pwm_evt, with i=[8:11]) is
internally synchronized on two timer-clock rising edges.
16.2.6 Accessing GP Timer Registers
All accesses are nonposted until software reconfiguration.
All registers are 32 bits wide, accessible through the L4 interface with 16-bit or 32-bit access (read/write).
2721
SWPU177N – December 2009 – Revised November 2010
Timers
Copyright © 2009–2010, Texas Instruments Incorporated