Timers, 1 timers, Figure 12–1. timer block diagram – Texas Instruments TMS320C3x User Manual

Page 381

Advertising
background image

Timers

12-2

12.1 Timers

The ’C3x has two 32-bit general-purpose timer modules. Each timer has two
signaling modes and internal or external clocking. You can use the timer
modules to signal to the ’C3x or the external world at specified intervals or to
count external events. With an internal clock, the timer can signal an external
A/D converter to start a conversion, or it can interrupt the ’C3x DMA controller
to begin a data transfer. The timer interrupt is one of the internal interrupts.
With an external clock, the timer can count external events and interrupt the
CPU after a specified number of events. Each timer has an I/O pin that you can
use as an input clock to the timer, as an output clock signal, or as a general-
purpose I/O pin.

Each timer consists of a 32-bit counter, a comparator, an input clock selector,
a pulse generator, and supporting hardware (see Figure 12–1). A timer counts
the cycles of a timer input clock with the counter register. When that counter
register equals the value stored in the timer-period register, it resets the
counter to 0 and produces a transition in the timer output signal. The timer input
clock can be driven by either half the internal clock frequency of the ’C3x or
an external clock on TCLKx pin.

Figure 12–1. Timer Block Diagram

Period register (31 – 0)

Comparator

?

Period = counter

Counter (32-bit)

Counter register

(31 – 0)

Pulse generator

TSTAT

H1/2

External clock

INV

INV

Timer out

32

32

Advertising