Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
БЭМЗ полищук доки / Склад / Datasheet_LM3S6965.pdf
Скачиваний:
10
Добавлен:
21.12.2020
Размер:
6.13 Mб
Скачать

General-Purpose Timers

Interrupt Clear (GPTMICR) register. The time at which the event happened can be obtained by reading the GPTM Timern (GPTMTnR) register.

In Input Edge Timing mode, the timer continues running after an edge event has been detected, but the timer interval can be changed at any time by writing the GPTMTnILR register. The change takes effect at the next cycle after the write.

10.3.616-Bit PWM Mode

A timer is configured to PWM mode using the following sequence:

1.Ensure the timer is disabled (the TnEN bit is cleared) before making any changes.

2.Write the GPTM Configuration (GPTMCFG) register with a value of 0x4.

3.In the GPTM Timer Mode (GPTMTnMR) register, set the TnAMS bit to 0x1, the TnCMR bit to 0x0, and the TnMR field to 0x2.

4.Configure the output state of the PWM signal (whether or not it is inverted) in the TnEVENT field of the GPTM Control (GPTMCTL) register.

5.Load the timer start value into the GPTM Timern Interval Load (GPTMTnILR) register.

6.Load the GPTM Timern Match (GPTMTnMATCHR) register with the desired value.

7.Set the TnEN bit in the GPTM Control (GPTMCTL) register to enable the timer and begin generation of the output PWM signal.

In PWM Timing mode, the timer continues running after the PWM signal has been generated. The PWM period can be adjusted at any time by writing the GPTMTnILR register, and the change takes effect at the next cycle after the write.

10.4Register Map

Table10-3onpage228liststheGPTMregisters. Theoffsetlistedisahexadecimalincrementtothe register’s address, relative to that timer’s base address:

Timer0: 0x4003.0000

Timer1: 0x4003.1000

Timer2: 0x4003.2000

Timer3: 0x4003.3000

Table 10-3. Timers Register Map

Offset

Name

Type

Reset

Description

See

page

 

 

 

 

 

0x000

GPTMCFG

R/W

0x0000.0000

GPTM Configuration

230

0x004

GPTMTAMR

R/W

0x0000.0000

GPTM TimerA Mode

231

0x008

GPTMTBMR

R/W

0x0000.0000

GPTM TimerB Mode

233

0x00C

GPTMCTL

R/W

0x0000.0000

GPTM Control

235

0x018

GPTMIMR

R/W

0x0000.0000

GPTM Interrupt Mask

238

0x01C

GPTMRIS

RO

0x0000.0000

GPTM Raw Interrupt Status

240

228 November 16, 2008

Preliminary

Соседние файлы в папке Склад