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
UM10316_0
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 00.06 — 17 December 2008
251 of 571
NXP Semiconductors
UM10316
Chapter 17: LPC29xx timer 0/1/2/3
5.3 Timer prescale register
The timer prescale register determines the number of clock cycles used as a prescale
value for the timer counter clock. When the Prescale_Register value is not equal to zero
the internal prescale counter first counts the number of CLK_TMRx cycles as defined in
this register plus one, then increments the TC_value.
Updates to the prescale register PR are only possible when the timer and prescale
counters are disabled, see bit COUNTER_ENABLE in the TCR register. It is advisable to
reset the timer counters once a new prescale value has been programmed. Writes to this
register are ignored when the timer counters are enabled (i.e. bit COUNTER_ENABLE in
the TCR register is set).
5.4 Timer match-control register
Each MCR can be configured through the match control register to stop both the timer
counter and prescale counter. This maintains their value at the time of the match to restart
the timer counter at logic 0, and allows the counters to continue counting and/or generate
an interrupt when their contents match those of the timer counter. A stop-on-match has
higher priority than a reset-on-match.
An interrupt is generated if one of the match registers matches the contents of the timer
counter and the interrupt has been enabled through the interrupt-enable control register.
The match control register is used to control what operations are performed when one of
the match registers matches the timer counter.
Table 207. PR register bit description
* = reset value
Bit
Variable name
Access
Value
Description
31 to 0
PR[31:0]
R/W
Prescale register. This specifies the maximum
value for the prescale counter. The timer
counter (TC) increments after ‘PR+1’
CLK_TMRx cycles are counted.
0000 00
00h*
Table 208. MCR register bits
* = reset value
Bit
Variable name
Access
Value
Description
31 to 8
reserved
R
-
Reserved; do not modify. Read as logic 0
7
STOP_3
R/W
1
Stop on match MR3 and TC. When logic 1 the
timer and prescale counter stop counting if
MR3 matches TC
0*
6
RESET_3
R/W
1
Reset on match MR3 and TC. When logic 1 the
timer counter is reset if MR3 matches TC
0*
5
STOP_2
R/W
1
Stop on match MR2 and TC. When logic 1 the
timer and prescale counter stop counting if
MR2 matches TC
0*