UM10850
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2016. All rights reserved.
User manual
Rev. 2.4 — 13 September 2016
181 of 464
NXP Semiconductors
UM10850
Chapter 13: LPC5410x SCTimer/PWM (SCT0)
13.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 and keeps running.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.
13.6.5 SCT halt event select register
The running counter can be disabled (halted) by an event. When any of the events
selected in this register occur, the counter stops running and all further events are
disabled.
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 211. SCT control register (CTRL, address 0x5000 4004) bit description
Bit
Symbol
Value
Description
Reset
value
Table 212. SCT limit event select register (LIMIT, address 0x5000 4008) bit description
Bit
Symbol
Description
Reset value
15: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, …). The number of bits = number of events in this SCT.
0
31: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, …). The number of bits = number of events in this SCT.
0