UM10413
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2011. All rights reserved.
User manual
Rev. 1 — 16 December 2011
182 of 268
NXP Semiconductors
UM10413
MPT612 User manual
21.5.2 Timer control register (TCR, TIMER1: T1TCR - 0xE000 8004)
The timer control register (TCR) is used to control the operation of the timer counter.
21.5.3 Count control register (CTCR, 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 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 edge or no changes in the level of the selected CAP input.
Only if the identified event corresponds to that selected by bits 1:0 in register CTCR, the
timer counter register is incremented.
Effective processing of the externally 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 cannot exceed one half of the
PCLK clock. Consequently, duration of the HIGH/LOW levels on the same CAP input in
this case cannot be shorter than 1 / PCLK.
Table 168: Timer control register (TCR, TIMER1: T1TCR - address 0xE000 8004) bit
description
Bit
Symbol
Description
Reset value
0
Counter Enable if logic 1, timer counter and prescale counter are
enabled for counting. If logic 0, counters are disabled.
0
1
Counter Reset
if logic 1, timer counter and prescale counter are
synchronously reset on next positive edge of PCLK.
Counters remain reset until TCR[1] is returned to logic 0.
0
7:2
-
reserved, user software must not write logic 1s to
reserved bits; value read from a reserved bit is not
defined
n/a
Table 169: Count control register (CTCR, TIMER1: T1TCR - address 0xE000 8070) bit
description
Bit
Symbol
Value
Description
Reset
value
1:0
Counter/
Timer
Mode
selects which rising PCLK edges can increment the timer’s
Prescale Counter (PC), or clear PC and increment Timer
Counter (TC)
00
00
timer mode: every rising PCLK edge
01
counter mode: TC is incremented on rising edges on CAP
input selected by bits 3:2
10
counter mode: TC is incremented on falling edges on CAP
input selected by bits 3:2
11
counter mode: TC is incremented on both edges on CAP
input selected by bits 3:2