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

General-Purpose Timers

10 General-Purpose Timers

Programmable timers can be used to count or time external events that drive the Timer input pins. TheStellaris® General-PurposeTimerModule(GPTM)containsfourGPTMblocks(Timer0,Timer1, Timer 2, and Timer 3). Each GPTM block provides two 16-bit timers/counters (referred to as TimerA and TimerB) that can be configured to operate independently as timers or event counters, or configured to operate as one 32-bit timer or one 32-bit Real-Time Clock (RTC).

In addition, timers can be used to trigger analog-to-digital conversions (ADC). The ADC trigger signals from all of the general-purpose timers are ORed together before reaching the ADC module, so only one timer should be used to trigger ADC events.

The GPT Module is one timing resource available on the Stellaris® microcontrollers. Other timer resources include the System Timer (SysTick) (see “System Timer (SysTick)” on page 46) and the PWM timer in the PWM module (see “PWM Timer” on page 487).

The General-Purpose Timers provide the following features:

Four General-Purpose Timer Modules (GPTM), each of which provides two 16-bit timers. Each GPTM can be configured to operate independently:

As a single 32-bit timer

As one 32-bit Real-Time Clock (RTC) to event capture

For Pulse Width Modulation (PWM)

To trigger analog-to-digital conversions

32-bit Timer modes

Programmable one-shot timer

Programmable periodic timer

Real-Time Clock when using an external 32.768-KHz clock as the input

Software-controlled event stalling (excluding RTC mode)

ADC event trigger

16-bit Timer modes

General-purposetimerfunctionwithan8-bitprescaler(forone-shotandperiodicmodesonly)

Programmable one-shot timer

Programmable periodic timer

User-enabled stalling when the controller asserts CPU Halt flag during debug

ADC event trigger

16-bit Input Capture modes

Input edge count capture

218

November 16, 2008

Preliminary

LM3S6965 Microcontroller

Input edge time capture

16-bit PWM mode

Simple PWM mode with software-programmable output inversion of the PWM signal

10.1Block Diagram

Note: InFigure10-1onpage219,thespecificCCPpinsavailabledependontheStellaris® device. See Table 10-1 on page 219 for the available CCPs.

Figure 10-1. GPTM Module Block Diagram

 

 

 

0x0000 (Down Counter Modes)

 

 

 

TimerA Control

 

 

 

 

GPTMTAPMR

TA Comparator

 

 

 

 

 

 

 

GPTMTAPR

 

 

 

 

GPTMTAMATCHR

 

Clock / Edge

 

Interrupt / Config

GPTMTAILR

 

Detect

 

En

32 KHz or

 

 

 

Even CCP Pin

 

 

GPTMTAMR

 

TimerA

GPTMCFG

 

 

 

 

 

 

 

 

 

Interrupt

GPTMCTL

 

 

 

 

GPTMIMR

 

 

RTC Divider

TimerB

GPTMRIS

 

 

 

GPTMMIS

 

 

 

Interrupt

TimerB Control

 

 

 

GPTMICR

GPTMTBPMR

En

 

 

 

Clock / Edge

 

 

 

 

 

GPTMTBPR

 

 

 

 

Detect

 

 

GPTMTBMATCHR

 

Odd CCP Pin

 

 

 

 

 

 

GPTMTBILR

TB Comparator

 

 

 

 

 

 

 

GPTMTBMR

 

 

 

 

 

0x0000 (Down Counter Modes)

 

System

 

 

 

 

Clock

 

 

 

 

Table 10-1. Available CCP Pins

Timer 16-Bit Up/Down CounterEven CCP PinOdd CCP Pin

Timer 0

TimerA

CCP0

-

 

TimerB

-

CCP1

Timer 1

TimerA

CCP2

-

 

TimerB

-

CCP3

Timer 2

TimerA

-

-

 

TimerB

-

-

Timer 3

TimerA

-

-

 

TimerB

-

-

November 16, 2008

219

Preliminary

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