
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
464 of 808
NXP Semiconductors
UM10360
Chapter 21: LPC17xx Timer 0/1/2/3
3.
Applications
•
Interval Timer for counting internal events.
•
Pulse Width Demodulator via Capture inputs.
•
Free running timer.
4.
Description
The Timer/Counter is designed to count cycles of the peripheral clock (PCLK) or an
externally-supplied clock, and can optionally generate interrupts or perform other actions
at specified timer values, based on four match registers. It also includes four capture
inputs to trap the timer value when an input signal transitions, optionally generating an
interrupt.
5.
Pin description
gives a brief summary of each of the Timer/Counter related pins.
5.1 Multiple CAP and MAT pins
Software can select from multiple pins for the CAP or MAT functions in the Pin Select
registers, which are described in
. When more than one pin is selected for a
MAT output, all such pins are driven identically. When more than one pin is selected for a
CAP input, the pin with the lowest Port number is used. Note that match conditions may
be used internally without the use of a device pin.
6.
Register description
Each Timer/Counter contains the registers shown in
("Reset Value" refers to
the data stored in used bits only; it does not include reserved bits content). More detailed
descriptions follow.
Table 405. Timer/Counter pin description
Pin
Type
Description
CAP0[1:0]
CAP1[1:0]
CAP2[1:0]
CAP3[1:0]
Input
Capture Signals- A transition on a capture pin can be configured to load one
of the Capture Registers with the value in the Timer Counter and optionally
generate an interrupt. Capture functionality can be selected from a number
of pins. When more than one pin is selected for a Capture input on a single
TIMER0/1 channel, the pin with the lowest Port number is used
Timer/Counter block can select a capture signal as a clock source instead of
the PCLK derived clock. For more details see
.
MAT0[1:0]
MAT1[1:0]
MAT2[3:0]
MAT3[1:0]
Output
External Match Output - When a match register (MR3:0) equals the timer
counter (TC) this output can either toggle, go low, go high, or do nothing. The
External Match Register (EMR) controls the functionality of this output.
Match Output functionality can be selected on a number of pins in parallel.