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
247 of 571
NXP Semiconductors
UM10316
Chapter 17: LPC29xx timer 0/1/2/3
3.
Timer counter and interrupt timing
Each timer consists of a prescale counter (PR register) and a timer counter (TC register).
The prescale counter is incremented at every cycle of the system clock. As soon as the
prescale counter matches the prescale value contained in the PV register it is reset to 0
and the timer counter is incremented. Both events occur at the next system clock cycle, so
effectively the timer counter is incremented at every prescale-value+1 cycle of the system
clock.
When the timer counter equals a match value (MRx registers) the timer performs the
configured match action (MCR register). For a reset on match the timer counter is reset at
the next prescaled clock (see
): for a stop-on-match the prescale and timer
counters stop immediately (see
If interrupts are enabled and an interrupt condition occurs (match value reached or
capture event received) the timer generates an interrupt. This interrupt is generated at the
next system clock cycle (see
and
PR=2, MRx=6
Fig 62. Reset-on-match timing
Prescale
Counter (PC)
CLK(SYS)
Timer
Counter (TC)
Timer Interrupt
(active low)
Timer Counter (TC)
reached
Match Value (MRx=6)
2
2
2
2
0
0
0
0
1
1
1
1
1
0
6
5
4