Texas Instruments TMS320C3x User Manual

Page 384

Advertising
background image

Timers

12-5

Peripherals

Table 12–1. Timer Global-Control Register Bits Summary

Abbreviation

Reset

Value

Name

Description

FUNC

0

Function

Controls the function of TCLK.

If FUNC = 0, TCLK is configured as a general-purpose digital I/O
port.

If FUNC = 1, TCLK is configured as a timer pin.

See section 12.1.6

Timer Operation Modes on page 12-10 for a

description of the relationship between FUNC and CLKSRC.

I/O

0

Input/output

If FUNC = 0 and CLKSRC = 0, TCLK is configured as a general-
purpose I/O pin.

If I/O = 0, TCLK is configured as a general-purpose input pin.

If I/O = 1, TCLK is configured as a general-purpose output pin.

DATOUT

0

Data output

Drives TCLK when the ’C3x is in I/O port mode. You can use DAT-
OUT as an input to the timer.

DATIN

x

Data input

Data input on TCLK or DATOUT. A write has no effect.

GO

0

Go

Resets and starts the timer counter.

When GO = 1 and the timer is not held, the counter is zeroed and
begins incrementing on the next rising edge of the timer input clock.
The GO bit is cleared on the same rising edge.

GO = 0 has no effect on the timer.

HLD

0

Counter hold
signal

When this bit is 0, the counter is disabled and held in its current
state. If the timer is driving TCLK, the state of TCLK is also held.

The internal divide-by-2 counter is also held so that the counter can
continue where it left off when HLD is set to 1.

You can read and modify the timer registers while the timer is being
held. RESET has priority over HLD. The effect of writing to GO and
HOLD is shown below.

GO

HLD Result

0

0

All timer operations are held. No reset is performed
(reset value).

0

1

Timer proceeds from state before write.

1

0

All timer operations are held, including zeroing of the
counter. The GO bit is not cleared until the timer is
taken out of hold.

1

1

Timer resets and starts.

† x = 0 or 1 (set to value read on TCLK)

Advertising