![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 1031](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_17218271031.webp)
UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 10 December 2015
1031 of 1441
NXP Semiconductors
UM10503
Chapter 32: LPC43xx/LPC43Sxx Timer0/1/2/3
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 corresponds to the one selected by bits 1:0 in the CTCR
register, the Timer Counter register will 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 can not exceed one quarter of
the PCLK clock. Consequently, duration of the high/low levels on the same CAP input in
this case can not be shorter than 1/(2 PCLK).
Table 798. Timer count control register (CTCR, addresses 0x4008 4070 (TIMER0),
0x4008 5070 (TIMER1), 0x400C 3070 (TIMER2), 0x400C 4070 (TIMER3)) bit
description
Bit
Symbol
Value
Description
Reset
value
1:0
CTMODE
Counter/Timer Mode
This field selects which rising PCLK edges can increment
Timer’s Prescale Counter (PC), or clear PC and increment
Timer Counter (TC).
Timer Mode: the TC is incremented when the Prescale
Counter matches the Prescale Register.
00
0x0
Timer Mode. Counts every rising PCLK edge
0x1
Counter Mode rising edge. TC is incremented on rising
edges on the CAP input selected by bits 3:2.
0x2
Counter Mode falling edge. TC is incremented on falling
edges on the CAP input selected by bits 3:2.
0x3
Counter Mode edges. TC is incremented on both edges on
the CAP input selected by bits 3:2.
3:2
CINSEL
Count Input Select
When bits 1:0 in this register are not 00, these bits select
which CAP pin is sampled for clocking.
Note:
If Counter mode is selected for a particular CAPn
input in the TnCTCR, the 3 bits for that input in the Capture
Control Register (TnCCR) must be programmed as 000.
However, capture and/or interrupt can be selected for the
other 3 CAPn inputs in the same timer.
00
0x0
CAP0. CAPn.0 for TIMERn
0x1
CAP1. CAPn.1 for TIMERn
0x2
CAP2. CAPn.2 for TIMERn
0x3
CAP3. CAPn.3 for TIMERn
31:4
-
-
Reserved, user software should not write ones to reserved
bits. The value read from a reserved bit is not defined.
NA