
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
192 of 464
NXP Semiconductors
UM10850
Chapter 13: LPC5410x SCTimer/PWM (SCT0)
An event can be programmed to occur based on a selected input or output edge or level
and/or based on its counter value matching a selected match register. In bi-directional
mode, events can also be enabled based on the direction of count.
When the UNIFY bit is 0, each event is associated with a particular counter by the
HEVENT bit in its event control register. An event is permanently disabled when its event
state mask register contains all 0s.
Each event can modify its counter STATE value. If more than one event associated with
the same counter occurs in a given clock cycle, only the state change specified for the
highest-numbered event among them takes place. Other actions dictated by any
simultaneously occurring events all take place.
Table 234. SCT event control register 0 to 12 (EV[0:12]_CTRL, address 0x5000 4304 (EV0_CTRL) to 0x5000 4364
(EV12_CTRL)) bit description
Bit
Symbol
Value
Description
Reset
value
3:0
MATCHSEL
-
Selects the Match register associated with this event (if any). A match can occur
only when the counter selected by the HEVENT bit is running.
0
4
HEVENT
Select L/H counter. Do not set this bit if UNIFY = 1.
0
0
Selects the L state and the L match register selected by MATCHSEL.
1
Selects the H state and the H match register selected by MATCHSEL.
5
OUTSEL
Input/output select
0
0
Selects the inputs elected by IOSEL.
1
Selects the outputs selected by IOSEL.
9:6
IOSEL
-
Selects the input or output signal number (0 to 3 for inputs or 0 to 5 for outputs)
associated with this event (if any). Do not select an input in this register, if
CKMODE is 1x. In this case the clock input is an implicit ingredient of every event.
0
11:10
IOCOND
Selects the I/O condition for event n. (The detection of edges on outputs lag the
conditions that switch the outputs by one SCT clock). In order to guarantee proper
edge/state detection, an input must have a minimum pulse width of at least one
SCT clock period .
0
0x0
LOW
0x1
Rise
0x2
Fall
0x3
HIGH
13:12
COMBMODE
Selects how the specified match and I/O condition are used and combined.
0
0x0
OR. The event occurs when either the specified match or I/O condition occurs.
0x1
MATCH. Uses the specified match only.
0x2
IO. Uses the specified I/O condition only.
0x3
AND. The event occurs when the specified match and I/O condition occur
simultaneously.
14
STATELD
This bit controls how the STATEV value modifies the state selected by HEVENT
when this event is the highest-numbered event occurring for that state.
0
0
STATEV value is added into STATE (the carry-out is ignored).
1
STATEV value is loaded into STATE.
19:15
STATEV
This value is loaded into or added to the state selected by HEVENT, depending on
STATELD, when this event is the highest-numbered event occurring for that state.
If STATELD and STATEV are both zero, there is no change to the STATE value.
0