DRAFT
DRAFT DRAFT DR
DRAFT DRAFT DRAFT
D
RAF
DRAFT DRAFT DRA
FT D
RAFT DR
AFT D
DRA
FT DRAFT DRAFT
D
RAFT
DRA
UM10601
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
Preliminary user manual
Rev. 1.0 — 7 November 2012
112 of 313
NXP Semiconductors
UM10601
Chapter 10: LPC800 State Configurable Timer (SCT)
1. Set up the SCT as one 32-bit timer or one or two 16-bit timers. See
.
2. Preload the 32-bit timer or the 16-bit timers with a count value. See
3. If you want to create a match event when the timer reaches a match value:
a. Configure the register map for match registers. See
.
b. Configure one or more match registers with a match value. See
.
c. For each match value, create a match event. See
d. If you want to create an interrupt on a match event, enable the event for interrupt.
.
e. If you want to create a match output on a pin, connect the CTOUTn function to a
pin (see
) and select an output for the match event in the EVn_CTRL
register. See
. The EVn_CTRL registers also control what type of output
signal is created.
4. If you want to capture a timer value on a capture signal:
a. Configure the register map for capture registers. See
.
b. Create one or more capture events. See
c. Connect the CTIN functions to pins (see
) and configure the signal to
create an event. See
5. Start the timer by writing to the CRTL register. See
6. Read the capture registers to read the timer value at the time of the capture events.
10.4 Pin description
The SCT inputs and outputs are movable functions and are assigned to external pins
through the switch matrix.
See
Section 9.3.1 “Connect an internal signal to a package pin”
to assign the SCT
functions to pins on the LPC800 package.
10.5 General description
The State Configurable Timer (SCT) allows a wide variety of timing, counting, output
modulation, and input capture operations.
Table 106. SCT pin description
Function
Direction Pin
Description
SWM register
Reference
CTIN_0
I
any
SCT input 0
PINASSIGN5
CTIN_1
I
any
SCT input 1
PINASSIGN6
CTIN_2
I
any
SCT input 2
PINASSIGN6
CTIN_3
I
any
SCT input 3
PINASSIGN6
CTOUT_0
O
any
SCT output 0
PINASSIGN6
CTOUT_1
O
any
SCT output 1
PINASSIGN7
CTOUT_2
O
any
SCT output 2
PINASSIGN7
CTOUT_3
O
any
SCT output 3
PINASSIGN7