![NXP Semiconductors LPC84x Скачать руководство пользователя страница 401](http://html.mh-extra.com/html/nxp-semiconductors/lpc84x/lpc84x_user-manual_1721742401.webp)
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
401 of 515
NXP Semiconductors
UM11029
Chapter 21: LPC84x SCTimer/PWM
21.6.25 SCTimer/PWM event control registers 0 to 7
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.
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 bidirectional
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 409. SCTimer/PWM event state mask registers 0 to 7 (EV[0:7]_STATE, offset 0x300
(EV0_STATE) to 0x338 (EV7_STATE)) bit description
Bit
Symbol
Description
Reset
value
7:0
STATEMSKn
If bit m is one, event n (n= 0 to 7) happens in state m of the
counter selected by the HEVENT bit (m = state number; state 0 =
bit 0, state 1= bit 1,..., state 7 = bit 7).
0
31:8
-
Reserved.
-
Table 410. SCTimer/PWM event control register 0 to 7 (EV[0:7]_CTRL, offset 0x304 (EV0_CTRL) to 0x33C
(EV7_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 CLKMODE
is 1x. In this case the clock input is an implicit ingredient of every event.
0