UM10462
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 5.5 — 21 December 2016
362 of 523
NXP Semiconductors
UM10462
Chapter 16: LPC11U3x/2x/1x 32-bit counter/timers CT32B0/1
16.7.11 Count Control Register
The Count Control Register (CTCR) is used to select between Timer and Counter mode,
and in Counter mode to select the pin and edges 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 occurs, and the event corresponds to the one selected by
bits 1:0 in the CTCR register, will the Timer Counter register be 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/LOWLOW levels on the same CAP input
in this case cannot be shorter than 1/PCLK.
Bits 7:4 of this register are also used to enable and configure the capture-clears-timer
feature. This feature allows for a designated edge on a particular CAP input to reset the
timer to all zeros. Using this mechanism to clear the timer on the leading edge of an input
pulse and performing a capture on the trailing edge, permits direct pulse-width
measurement using a single capture input without the need to perform a subtraction
operation in software.
11:10
EMC3
External Match Control 3. Determines the functionality of External Match 3.
00
0x0
Do Nothing.
0x1
Clear the corresponding External Match bit/output to 0 (CT32Bi_MAT3 pin is LOW if
pinned out).
0x2
Set the corresponding External Match bit/output to 1 (CT32Bi_MAT3 pin is HIGH if
pinned out).
0x3
Toggle the corresponding External Match bit/output.
31:12 -
Reserved, user software should not write ones to reserved bits. The value read from a
reserved bit is not defined.
NA
Table 331: External Match Register (EMR, address 0x4001 403C (CT32B0) and 0x4001 803C (CT32B1)) bit
description
Bit
Symbol
Value
Description
Reset
value
Table 332. External match control
EMR[11:10], EMR[9:8],
EMR[7:6], or EMR[5:4]
Function
00
Do Nothing.
01
Clear the corresponding External Match bit/output to 0 (CT32Bn_MATm pin is LOW if
pinned out).
10
Set the corresponding External Match bit/output to 1 (CT32Bn_MATm pin is HIGH if
pinned out).
11
Toggle the corresponding External Match bit/output.