Datasheet

UM10398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2014. All rights reserved.
User manual Rev. 12.3 — 10 June 2014 363 of 547
NXP Semiconductors
UM10398
Chapter 20: LPC1100/LPC1100C/LPC1100L series: 32-bit counter/timer
20.5 Description
Each Counter/timer 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. The peripheral clock is provided by
the system clock (see Figure 8
). Each counter/timer also includes one capture input to
trap the timer value when an input signal transitions, optionally generating an interrupt.
In PWM mode, three match registers can be used to provide a single-edge controlled
PWM output on the match output pins. One match register is used to control the PWM
cycle length.
Remark: 32-bit counter/timer0 (CT32B0) and 32-bit counter/timer1 (CT32B1) are
functionally identical except for the peripheral base address.
20.6 Pin description
Table 311 gives a brief summary of each of the counter/timer related pins.
20.7 Register description
32-bit counter/timer0 contains the registers shown in Table 312 and 32-bit counter/timer1
contains the registers shown in Table 313
. More detailed descriptions follow.
Table 311. Counter/timer pin description
Pin Type Description
CT32B0_CAP0
CT32B1_CAP0
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.
The counter/timer block can select a capture signal as a clock source instead of the
PCLK derived clock. For more details see Section 20.7.11 “
Count Control Register
(TMR32B0CTCR and TMR32B1TCR)” on page 371.
CT32B0_MAT[3:0]
CT32B1_MAT[3:0]
Output External Match Output of CT32B0/1:
When a match register TMR32B0/1MR3:0 equals the timer counter (TC), this output
can either toggle, go LOW, go HIGH, or do nothing. The External Match Register
(EMR) and the PWM Control register (PWMCON) control the functionality of this
output.
Table 312. Register overview: 32-bit counter/timer 0 CT32B0 (base address 0x4001 4000)
Name Access Address
offset
Description Reset
value
[1]
TMR32B0IR R/W 0x000 Interrupt Register (IR). The IR can be written to clear interrupts. The IR
can be read to identify which of five possible interrupt sources are
pending.
0
TMR32B0TCR R/W 0x004 Timer Control Register (TCR). The TCR is used to control the Timer
Counter functions. The Timer Counter can be disabled or reset through
the TCR.
0
TMR32B0TC R/W 0x008 Timer Counter (TC). The 32-bit TC is incremented every PR+1 cycles of
PCLK. The TC is controlled through the TCR.
0
TMR32B0PR R/W 0x00C Prescale Register (PR). When the Prescale Counter (below) is equal to
this value, the next clock increments the TC and clears the PC.
0