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
134 of 313
NXP Semiconductors
UM10601
Chapter 10: LPC800 State Configurable Timer (SCT)
10.7.6 Clearing the prescaler
When enabled by a non-zero PRE field in the Control register, the prescaler acts as a
clock divider for the counter, like a fractional part of the counter value. The prescaler is
cleared whenever the counter is cleared or loaded for any of the following reasons:
•
Hardware reset
•
Software writing to the counter register
•
Software writing a 1 to the CLRCTR bit in the control register
•
an event selected by a 1 in the counter limit register when BIDIR = 0
When BIDIR is 0, a limit event caused by an I/O signal can clear a non-zero prescaler.
However, a limit event caused by a Match only clears a non-zero prescaler in one special
case as described
A limit event when BIDIR is 1 does not clear the prescaler. Rather it clears the DOWN bit
in the Control register, and decrements the counter on the same clock if the counter is
enabled in that clock.
10.7.7 Match vs. I/O events
Counter operation is complicated by the prescaler and by clock mode 01 in which the SCT
clock is the bus clock. However, the prescaler and counter are enabled to count only when
a selected edge is detected on a clock input.
•
The prescaler is enabled when the clock mode is not 01, or when the input edge
selected by the CLKSEL field is detected.
•
The counter is enabled when the prescaler is enabled, and (PRELIM=0 or the
prescaler is equal to the value in PRELIM).
An I/O component of an event can occur in any SCT clock when its counter HALT bit is 0.
In general, a Match component of an event can only occur in a UT clock when its counter
HALT and STOP bits are both 0 and the counter is enabled.
shows when the various kinds of events can occur.
Table 133. Event conditions
COMBMODE IOMODE
Event can occur on clock:
IO
Any
Event can occur whenever HALT = 0 (type A).
MATCH
Any
Event can occur when HALT = 0 and STOP = 0 and the counter is
enabled (type C).
OR
Any
From the IO component: Event can occur whenever HALT = 0 (A).
From the match component: Event can occur when HALT = 0 and
STOP = 0 and the counter is enabled (C).
AND
LOW or HIGH Event can occur when HALT = 0 and STOP = 0 and the counter is
enabled (C).
AND
RISE or FALL
Event can occur whenever HALT = 0 (A).