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
374 of 515
NXP Semiconductors
UM11029
Chapter 21: LPC84x SCTimer/PWM
–
Selected events can limit, halt, start, or stop a counter or change its direction.
–
Events trigger state changes, transitions, timer captures, interrupts, and DMA
transactions.
–
Match register 0 can be used as an automatic limit.
–
In bidirectional mode, events can be enabled based on the count direction.
–
Match events can be held until another qualifying event occurs.
•
State control features:
–
States have no pre-defined meaning. Entirely determined by the user. States
provide a mechanism for context switching for the SCTimer/PWM including
creation of complex state machines.
–
The only function a State serves is to define which events can occur in that state.
–
A state changes into some other state as a result of an event.
–
Each event can be assigned to one or more states.
–
State variable allows sequencing across multiple counter cycles.
21.3 Basic configuration
Configure the SCTimer/PWM as follows:
•
Enable the clock to the SCTimer/PWM in the SYSAHBCLKCTRL register
(
) to enable the register interface and the peripheral clock.
•
Clear the SCTimer/PWM peripheral reset using the PRESETCTRL register
(
•
The SCTimer/PWM provides an interrupt to the NVIC, see
•
Use the INPUT MUX to connect the SCTimer/PWM inputs to external pins. See
•
Use the switch matrix registers to connect the SCTimer/PWM outputs to external pins.
See
•
The SCTimer/PWM DMA request lines are connected to the DMA trigger inputs via
the DMA_ITRIG_PINMUX registers. See
Fig 40. SCTimer/PWM clocking
aaa-xxxxxx
fro
main_clk
sys_pll0_clk
“none”
SCT clock select
SCTCLKSEL[1:0]
00
01
10
11
SCTCLKDIV
SYSAHBCLKCTRL0[SCT]
SCT
Clock Divider
to SCT input 4