Philips LPC213 Series User Manual page 174

Table of Contents

Advertisement

Philips Semiconductors
Volume 1
Table 147: Timer Control Register (TCR, TIMER0: T0TCR - address 0xE000 4004 and TIMER1:
Bit
0
1
7:2
14.5.3 Count Control Register (CTCR, TIMER0: T0CTCR - 0xE000 4070 and
TIMER1: T1TCR - 0xE000 8070)
The Count Control Register (CTCR) is used to select between Timer and Counter mode,
and in Counter mode to select the pin and edge(s) for counting.
When Counter Mode is chosen as a mode of operation, the CAP input (selected by the
CTCR bits 3:2) is sampled on every rising edge of the PCLK clock. After comparing two
consecutive samples of this CAP input, one of the following four events is recognized:
rising edge, falling edge, either of edges or no changes in the level of the selected CAP
input. Only if the identified event corresponds to the one selected by bits 1:0 in the CTCR
register, the Timer Counter register will be incremented.
Effective processing of the externaly supplied clock to the counter has some limitations.
Since two successive rising edges of the PCLK clock are used to identify only one edge
on the CAP selected input, the frequency of the CAP input can not exceed one half of the
PCLK clock. Consequently, duration of the high/low levels on the same CAP input in this
case can not be shorter than 1/PCLK.
Table 148: Count Control Register (CTCR, TIMER0: T0CTCR - address 0xE000 4070 and
Bit
1:0
User manual
T1TCR - address 0xE000 8004) bit description
Symbol
Description
Counter Enable When one, the Timer Counter and Prescale Counter are
enabled for counting. When zero, the counters are
disabled.
Counter Reset
When one, the Timer Counter and the Prescale Counter
are synchronously reset on the next positive edge of
PCLK. The counters remain reset until TCR[1] is
returned to zero.
-
Reserved, user software should not write ones to
reserved bits. The value read from a reserved bit is not
defined.
TIMER1: T1TCR - address 0xE000 8070) bit description
Symbol
Value
Description
Counter/
This field selects which rising PCLK edges can increment
Timer
Timer's Prescale Counter (PC), or clear PC and increment
Mode
Timer Counter (TC).
00
Timer Mode: every rising PCLK edge
01
Counter Mode: TC is incremented on rising edges on the
CAP input selected by bits 3:2.
10
Counter Mode: TC is incremented on falling edges on the
CAP input selected by bits 3:2.
11
Counter Mode: TC is incremented on both edges on the CAP
input selected by bits 3:2.
Rev. 01 — 24 June 2005
UM10120
Chapter 14: TIMER0 and TIMER1
Reset value
0
0
NA
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
Reset
value
00
174

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lpc2131Lpc2132Lpc2134Lpc2136Lpc2138

Table of Contents