MOTOROLA
Chapter 20. General Purpose Timer Modules (GPTA and GPTB)
20-17
Functional Description
20.6 Functional Description
The General Purpose Timer (GPT) module is a 16-bit, 4-channel timer with input capture
and output compare functions and a pulse accumulator.
20.6.1 Prescaler
The prescaler divides the module clock by 1, 2, 4, 8, 16, 32, 64, or 128. The PR[2:0] bits in
GPTSCR2 select the prescaler divisor.
20.6.2 Input Capture
Clearing an I/O select bit, IOS
n
, configures channel
n
as an input capture channel. The
input capture function captures the time at which an external event occurs. When an active
edge occurs on the pin of an input capture channel, the timer transfers the value in the GPT
counter into the GPT channel registers, GPTC
n
.
The minimum pulse width for the input capture input is greater than two module clocks.
The input capture function does not force data direction. The GPT port data direction
register controls the data direction of an input capture pin. Pin conditions such as rising or
falling edges can trigger an input capture only on a pin configured as an input.
An input capture on channel
n
sets the C
n
F flag. The C
n
I bit enables the C
n
F flag to
generate interrupt requests.
20.6.3 Output Compare
Setting an I/O select bit, IOS
n
, configures channel
n
as an output compare channel. The
output compare function can generate a periodic pulse with a programmable polarity,
duration, and frequency. When the GPT counter reaches the value in the channel registers
of an output compare channel, the timer can set, clear, or toggle the channel pin. An output
compare on channel
n
sets the C
n
F flag. The C
n
I bit enables the C
n
F flag to generate
interrupt requests.
The output mode and level bits, OM
n
and OL
n
, select, set, clear, or toggle on output
compare. Clearing both OM
n
and OL
n
disconnects the pin from the output logic.
Setting a force output compare bit, FOC
n
, causes an output compare on channel
n
. A forced
output compare does not set the channel flag.
A successful output compare on channel 3 overrides output compares on all other output
compare channels. A channel 3 output compare can cause bits in the output compare 3 data
register to transfer to the GPT port data register, depending on the output compare 3 mask
register. The output compare 3 mask register masks the bits in the output compare 3 data
register. The GPT counter reset enable bit, TCRE, enables channel 3 output compares to
Summary of Contents for ColdFire MCF5281
Page 124: ...3 20 MCF5282 User s Manual MOTOROLA EMAC Instruction Set Summary ...
Page 141: ...MOTOROLA Chapter 5 Static RAM SRAM 5 5 SRAM Programming Model ...
Page 142: ...5 6 MCF5282 User s Manual MOTOROLA SRAM Programming Model ...
Page 168: ...6 26 MCF5282 User s Manual MOTOROLA Interrupts ...
Page 186: ...7 18 MCF5282 User s Manual MOTOROLA Functional Description ...
Page 228: ...9 22 MCF5282 User s Manual MOTOROLA Functional Description ...
Page 246: ...10 18 MCF5282 User s Manual MOTOROLA Low Power Wakeup Operation ...
Page 254: ...11 8 MCF5282 User s Manual MOTOROLA Memory Map and Registers ...
Page 264: ...12 10 MCF5282 User s Manual MOTOROLA Chip Select Registers ...
Page 280: ...13 16 MCF5282 User s Manual MOTOROLA Misaligned Operands ...
Page 314: ...14 34 MCF5282 User s Manual MOTOROLA MCF5282 External Signals ...
Page 339: ...MOTOROLA Chapter 15 Synchronous DRAM Controller Module 15 25 SDRAM Example ...
Page 340: ...15 26 MCF5282 User s Manual MOTOROLA SDRAM Example ...
Page 356: ...16 16 MCF5282 User s Manual MOTOROLA DMA Controller Module Functional Description ...
Page 408: ...17 52 MCF5282 User s Manual MOTOROLA Buffer Descriptors ...
Page 446: ...20 24 MCF5282 User s Manual MOTOROLA Interrupts ...
Page 474: ...22 18 MCF5282 User s Manual MOTOROLA Programming Model ...
Page 510: ...23 36 MCF5282 User s Manual MOTOROLA Operation ...
Page 526: ...24 16 MCF5282 User s Manual MOTOROLA I2C Programming Examples ...
Page 672: ...28 12 MCF5282 User s Manual MOTOROLA Functional Description ...
Page 718: ...29 46 MCF5282 User s Manual MOTOROLA Motorola Recommended BDM Pinout ...
Page 750: ...32 8 MCF5282 User s Manual MOTOROLA Ordering Information ...