
UM10800
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2016. All rights reserved.
User manual
Rev. 1.2 — 5 October 2016
271 of 487
NXP Semiconductors
UM10800
Chapter 16: LPC82x SCTimer/PWM
16.6.4 SCT limit event select register
The running counter can be limited by an event. When any of the events selected in this
register occur, the counter is cleared to zero from its current value or changes counting
direction if in bi-directional mode.
Each bit of the register is associated with a different event (bit 0 with event 0, etc.). Setting
a bit causes its associated event to serve as a LIMIT event. When any limit event occurs,
the counter is reset to zero in uni-directional mode or changes its direction of count in
bi-directional mode.To define the actual limiting event (a match, an I/O pin toggle, etc.),
see the EVn_CTRL register.
Remark:
Counting up to all ones or counting down to zero is always equivalent to a limit
event occurring.
Note that in addition to using this register to specify events that serve as limits, it is also
possible to automatically cause a limit condition whenever a match register 0 match
occurs. This eliminates the need to define an event for the sole purpose of creating a limit.
The AUTOLIMITL and AUTOLIMITH bits in the configuration register enable/disable this
feature (see
If UNIFY = 1 in the CONFIG register, only the _L bits are used.
If UNIFY = 0 in the CONFIG register, this register can be written to as two registers
LIMIT_L and LIMIT_H. Both the L and H registers can be read or written individually or in
a single 32-bit read or write operation.
20
BIDIR_H
Direction select
0
0
The H counter counts up to its limit condition, then is cleared to zero.
1
The H counter counts up to its limit, then counts down to a limit condition or to 0.
28:21
PRE_H
-
Specifies the factor by which the SCT clock is prescaled to produce the H counter
clock. The counter clock is clocked at the rate of the SCT clock divided by PRELH+1.
Remark:
Clear the counter (by writing a 1 to the CLRCTR bit) whenever changing
the PRE value.
0
31:29
-
Reserved
Table 224. SCT control register (CTRL, address 0x5000 4004) bit description
Bit
Symbol
Value
Description
Reset
value
Table 225. SCT limit event select register (LIMIT, address 0x5000 4008) bit description
Bit
Symbol
Description
Reset
value
7:0
LIMMSK_L
If bit n is one, event n is used as a counter limit for the L or
unified counter (event 0 = bit 0, event 1 = bit 1, event 7 = bit
7).
0
15:8
-
Reserved.
-
23:16
LIMMSK_H
If bit n is one, event n is used as a counter limit for the H
counter (event 0 = bit 16, event 1 = bit 17, event 7 = bit 23).
0
31:24
-
Reserved.
-