2 starting the timer, 3 timer mode control – Texas Instruments MSP430x4xx User Manual

Page 237

Advertising
background image

Timer_B Operation

13-5

Timer_B

13.2.2 Starting the Timer

The timer may be started or restarted in the following ways:

-

The timer counts when MCx > 0 and the clock source is active.

-

When the timer mode is either up or up/down, the timer may be stopped
by loading 0 to TBCL0. The timer may then be restarted by loading a
nonzero value to TBCL0. In this scenario, the timer starts incrementing in
the up direction from zero.

13.2.3 Timer Mode Control

The timer has four modes of operation as described in Table 13−1: stop, up,
continuous, and up/down. The operating mode is selected with the MCx bits.

Table 13−1.Timer Modes

MCx

Mode

Description

00

Stop

The timer is halted.

01

Up

The timer repeatedly counts from zero to the value of
compare register TBCL0.

10

Continuous

The timer repeatedly counts from zero to the value se-
lected by the TBCNTLx bits.

11

Up/down

The timer repeatedly counts from zero up to the value of
TBCL0 and then back down to zero.

Advertising