![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 996](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_1721827996.webp)
UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 10 December 2015
996 of 1441
NXP Semiconductors
UM10503
Chapter 31: LPC43xx/LPC43Sxx State Configurable Timer (SCT) with
31.3.8 SCT counter register
If UNIFY = 1 in the CONFIG register, the counter is a unified 32-bit register and both the
_L and _H bits are used.
If UNIFY = 0 in the CONFIG register, this register can be written to as two registers
COUNT_L and COUNT_H. Both the L and H registers can be read or written individually
or in a single 32-bit read or write operation. In this case, the L and H registers count
independently under the control of the other registers.
Attempting to write a counter while it is running does not affect the counter but produces a
bus error. Software can read the counter registers at any time.
31.3.9 SCT state register
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
STATE_L and STATE_H. Both the L and H registers can be read or written individually or
in a single 32-bit read or write operation.
Software can read the state associated with a counter at any time. Writing the state is only
allowed when the counter HALT bit is 1; when HALT is 0, a write attempt does not change
the state and results in a bus error.
The state variable is the main feature that distinguishes the SCT from other counter/timer/
PWM blocks. Events can be made to occur only in certain states. Events, in turn, can
perform the following actions:
Table 753. SCT dither condition register (DITHER, address 0x4000 0018) bit description
Bit
Symbol
Description
Reset
value
15:0
DITHMSK_L
If bit n is one, the event n causes the dither engine to advance
to the next element in the dither pattern at the start of the next
counter cycle of the 16-bit low counter or the unified counter
(event 0 = bit 0, event 1 = bit 1, event 15 = bit 15). If all bits are
set to 0, the dither pattern automatically advances at the start
of every new counter cycle.
0
31:16 DITHMSK_H
If bit n is one, the event n causes the dither engine to advance
to the next element in the dither pattern at the start of the next
counter cycle of the 16-bit high counter (event 0 = bit 0, event 1
= bit 1, event 15 = bit 15). If all bits are set to 0, the dither
pattern automatically advances at the start of every new
counter cycle.
0
Table 754. SCT counter register (COUNT, address 0x4000 0040) bit description
Bit
Symbol
Description
Reset
value
15:0
CTR_L
When UNIFY = 0, read or write the 16-bit L counter value. When
UNIFY = 1, read or write the lower 16 bits of the 32-bit unified
counter.
0
31:16
CTR_H
When UNIFY = 0, read or write the 16-bit H counter value. When
UNIFY = 1, read or write the upper 16 bits of the 32-bit unified
counter.
0