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
412 of 515
NXP Semiconductors
UM11029
Chapter 21: LPC84x SCTimer/PWM
This application of the SCTimer/PWM uses the following configuration (all register values
not listed in
are set to their default values):
Fig 50. SCTimer/PWM configuration example
STATE 0
STATE 1
STATE 0
SCT
output 0
SCT
counter
SCT
input 0
match
events
EV0
EV3
EV3
EV4
EV4
EV1
EV1
EV1
EV1
EV2
MAT0/
AUTOLIMIT
EV5
EV0
EV0
EV0
input transition
events
MAT0/
AUTOLIMIT
MAT0/
AUTOLIMIT
MAT0/
AUTOLIMIT
MAT0/
AUTOLIMIT
MAT0/
AUTOLIMIT
Table 414. SCTimer/PWM configuration example
Configuration
Registers
Setting
Counter
CONFIG
Uses one counter (UNIFY = 1).
CONFIG
Enable the autolimit for MAT0. (AUTOLIMIT = 1.)
CTRL
Uses unidirectional counter (BIDIR_L = 0).
Clock base
CONFIG
Uses default values for clock configuration.
Match/Capture registers REGMODE
Configure one match register for each match event by setting
REGMODE_L bits 0,1, 2, 3, 4 to 0. This is the default.
Define match values
MATCH0/1/2/3/4
Set a match value MATCH0/1/2/4/5_L in each register. The match 0
register serves as an automatic limit event that resets the counter.
without using an event. To enable the automatic limit, set the
AUTOLIMIT bit in the CONFIG register.
Define match reload
values
MATCHREL0/1/2/3/4
Set a match reload value RELOAD0/1/2/3/4_L in each register
(same as the match value in this example).
Define when event 0
occurs
EV0_CTRL
•
Set COMBMODE = 0x1. Event 0 uses match condition only.
•
Set MATCHSEL = 1. Select match value of match register 1.
The match value of MAT1 is associated with event 0.
Define when event 1
occurs
EV1_CTRL
•
Set COMBMODE = 0x1. Event 1 uses match condition only.
•
Set MATCHSEL = 2 Select match value of match register 2. The
match value of MAT2 is associated with event 1.