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
388 of 515
NXP Semiconductors
UM11029
Chapter 21: LPC84x SCTimer/PWM
21.6.4 SCTimer/PWM limit event select register
The running counter can be limited by an event. When any of the events selected in this
register occur, the counter is cleared to zero from its current value or changes counting
direction if in bidirectional mode.
Each bit of the register is associated with a different event (bit 0 with event 0, etc.). Setting
a bit causes its associated event to serve as a LIMIT event. When any limit event occurs,
the counter is reset to zero in unidirectional mode or changes its direction of count in
bidirectional mode. To define the actual limiting event (a match, an I/O pin toggle, etc.),
see the EVn_CTRL register.
Remark:
Counting up to all ones or counting down to zero is always equivalent to a limit
event occurring.
Note that in addition to using this register to specify events that serve as limits, it is also
possible to automatically cause a limit condition whenever a match register 0 match
occurs. This eliminates the need to define an event for the sole purpose of creating a limit.
The AUTOLIMITL and AUTOLIMITH bits in the configuration register enable/disable this
feature (see
If UNIFY = 1 in the CONFIG register, only the _L bits are used.
If UNIFY = 0 in the CONFIG register, this register can be written to as two registers
LIMIT_L and LIMIT_H. Both the L and H registers can be read or written individually or in
a single 32-bit read or write operation.
18
HALT_H
-
When this bit is 1, the H counter does not run and no events can occur. A reset sets
this bit. When the HALT_H bit is one, the STOP_H bit is cleared.
It is possible to remove the halt condition while keeping the SCTimer/PWM in the
stop condition (not running) with a single write to this register to simultaneously clear
the HALT bit and set the STOP bit.
Remark:
Once set, this bit can only be cleared by software to restore counter
operation. This bit is set on reset.
1
19
CLRCTR_H -
When the counter is halted (not just stopped), writing a 1 to this bit will clear the H
counter. This bit always reads as 0.
0
20
BIDIR_H
Direction select
0
0
The H counter counts up to its limit condition, then is cleared to zero.
1
The H counter counts up to its limit, then counts down to a limit condition or to 0.
28:21
PRE_H
-
Specifies the factor by which the SCTimer/PWM clock is prescaled to produce the H
counter clock. The counter clock is clocked at the rate of the SCTimer/PWM clock
divided by PRELH+1.
Remark:
Clear the counter (by writing a 1 to the CLRCTR bit) whenever changing
the PRE value.
0
31:29
-
-
Reserved
-
Table 387. SCTimer/PWM control register (CTRL, offset 0x004) bit description
Bit
Symbol
Value
Description
Reset
value