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
191 of 464
NXP Semiconductors
UM10850
Chapter 13: LPC5410x SCTimer/PWM (SCT0)
If UNIFY = 0 in the CONFIG register, this register can be written to as two registers
CAPCTRLn_L and CAPCTRLn_H. Both the L and H registers can be read or written
individually or in a single 32-bit read or write operation.
Based on a selected event, the capture registers can be loaded with the current counter
value when the event occurs.
Each Capture Control register (L, H, or unified 32-bit) controls which events cause the
load of corresponding Capture register from the counter.
13.6.24 SCT event enable registers 0 to 12
Each event can be enabled in some contexts (or states) and disabled in others. Each
event defined in the EV_CTRL register has one associated event enable register that can
enable or disable the event for each available state.
Each event has one associated SCT event state mask register that allow this event to
happen in one or more states of the counter selected by the HEVENT bit in the
corresponding EVn_CTRL register.
An event n is disabled when its EVn_STATE register contains all zeros, since it is masked
regardless of the current state.
In simple applications that do not use states, write 0x01 to this register to enable each
event in exactly one state. Since the state doesn’t change (that is, the state variable
always remains at its reset value of 0), writing 0x01 permanently enables this event.
13.6.25 SCT event control registers 0 to 12
This register defines the conditions for an event to occur based on the counter values or
input and output states.Once the event is configured, it can be selected to trigger multiple
actions (for example stop the counter and toggle an output) unless the event is blocked in
the current state of the SCT or the counter is halted. To block a particular event from
occurring, use the EV_STATE register. To block all events for a given counter, set the
HALT bit in the CTRL register or select an event to halt the counter.
Table 232. SCT capture control registers 0 to 12 (CAPCTRL[0:12], address 0x5000 4200 (CAPCTRL0) to 0x5000 4230
(CAPCTRL12)) bit description (REGMODEn bit = 1)
Bit
Symbol
Description
Reset value
15:0
CAPCONn_L
If bit m is one, event m causes the CAPn_L (UNIFY = 0) or the CAPn (UNIFY = 1)
register to be loaded (event 0 = bit 0, event 1 = bit 1, …). The number of bits =
number of match/captures in this SCT.
0
31:16
CAPCONn_H
If bit m is one, event m causes the CAPn_H (UNIFY = 0) register to be loaded (event
0 = bit 16, event 1 = bit 17, …). The number of bits = number of match/captures in
this SCT.
0
Table 233. SCT event state mask registers 0 to 12 (EV[0:12]_STATE, addresses 0x5000 4300 (EV0_STATE) to 0x5000
4360 (EV12_STATE)) bit description
Bit
Symbol
Description
Reset value
15:0
STATEMSKn
If bit m is one, event n happens in state m of the counter selected by the HEVENT bit
(n = event number, m = state number; state 0 = bit 0, state 1= bit 1, …). The number
of bits = number of states in this SCT.
0
31:16
-
Reserved.
-