DRAFT
DRAFT DRAFT DR
DRAFT DRAFT DRAFT
D
RAF
DRAFT DRAFT DRA
FT D
RAFT DR
AFT D
DRA
FT DRAFT DRAFT
D
RAFT
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
111 of 313
10.1 How to read this chapter
The SCT is available on all LPC800 parts.
10.2 Features
•
Two 16-bit counters or one 32-bit counter.
•
Counters clocked by bus clock or selected input.
•
Up counters or up-down counters.
•
State variable allows sequencing across multiple counter cycles.
•
The following conditions define an event: a counter match condition, an input (or
output) condition, a combination of a match and/or and input/output condition in a
specified state, and the count direction.
•
Events control outputs, interrupts, and the SCT states.
–
Match register 0 can be used as an automatic limit.
–
In bi-directional mode, events can be enabled based on the count direction.
–
Match events can be held until another qualifying event occurs.
•
Selected events can limit, halt, start, or stop a counter.
•
Supports:
–
4 inputs
–
4 outputs
–
5 match/capture registers
–
6 events
–
2 states
10.3 Basic configuration
Configure the SCT as follows:
•
Use the SYSAHBCLKCTRL register (
) to enable the clock to the SCT register
interface and peripheral clock. The LPC800 system clock is the input clock to the SCT
clock processing and is the source of the SCT clock.
•
Clear the SCT peripheral reset using the PRESETCTRL register (
•
The SCT combined interrupt is connected to slot #8 in the NVIC.
•
Use the switch matrix to connect the SCT inputs and outputs to pins (see
).
10.3.1 Use the SCT as a simple timer
To configure the SCT as a simple timer with match or capture functionality, follow these
steps:
UM10601
Chapter 10: LPC800 State Configurable Timer (SCT)
Rev. 1.0 — 7 November 2012
Preliminary user manual