UM11029
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2017. All rights reserved.
User manual
Rev. 1.0 — 16 June 2017
413 of 515
NXP Semiconductors
UM11029
Chapter 21: LPC84x SCTimer/PWM
Define when event 2
occurs
EV2_CTRL
•
Set COMBMODE = 0x3. Event 2 uses match condition and I/O
condition.
•
Set IOSEL = 0. Select input 0.
•
Set IOCOND = 0x0. Input 0 is LOW.
•
Set MATCHSEL = 0. Chooses match register 0 to qualify the
event.
Define how event 2
changes the state
EV2_CTRL
Set STATEV bits to 1 and the STATED bit to 1. Event 2 changes the
state to state 1.
Define when event 3
occurs
EV3_CTRL
•
Set COMBMODE = 0x1. Event 3 uses match condition only.
•
Set MATCHSEL = 0x3. Select match value of match register 3.
The match value of MAT3 is associated with event 3.
Define when event 4
occurs
EV4_CTRL
•
Set COMBMODE = 0x1. Event 4 uses match condition only.
•
Set MATCHSEL = 0x4. Select match value of match register
4.The match value of MAT4 is associated with event 4.
Define when event 5
occurs
EV5_CTRL
•
Set COMBMODE = 0x3. Event 5 uses match condition and I/O
condition.
•
Set IOSEL = 0. Select input 0.
•
Set IOCOND = 0x3. Input 0 is HIGH.
•
Set MATCHSEL = 0. Chooses match register 0 to qualify the
event.
Define how event 5
changes the state
EV5_CTRL
Set STATEV bits to 0 and the STATED bit to 1. Event 5 changes the
state to state 0.
Define by which events
output 0 is set
OUT0_SET
Set SET0 bits 0 (for event 0) and 3 (for event 3) to one to set the
output when these events 0 and 3 occur.
Define by which events
output 0 is cleared
OUT0_CLR
Set CLR0 bits 1 (for events 1) and 4 (for event 4) to one to clear the
output when events 1 and 4 occur.
Configure states in which
event 0 is enabled
EV0_STATE
Set STATEMSK0 bit 0 to 1. Set all other bits to 0. Event 0 is enabled
in state 0.
Configure states in which
event 1 is enabled
EV1_STATE
Set STATEMSK1 bit 0 to 1. Set all other bits to 0. Event 1 is enabled
in state 0.
Configure states in which
event 2 is enabled
EV2_STATE
Set STATEMSK2 bit 0 to 1. Set all other bits to 0. Event 2 is enabled
in state 0.
Configure states in which
event 3 is enabled
EV3_STATE
Set STATEMSK3 bit 1 to 1. Set all other bits to 0. Event 3 is enabled
in state 1.
Configure states in which
event 4 is enabled
EV4_STATE
Set STATEMSK4 bit 1 to 1. Set all other bits to 0. Event 4 is enabled
in state 1.
Configure states in which
event 5 is enabled
EV5_STATE
Set STATEMSK5 bit 1 to 1. Set all other bits to 0. Event 5 is enabled
in state 1.
Table 414. SCTimer/PWM configuration example
Configuration
Registers
Setting