
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
524 of 808
NXP Semiconductors
UM10360
Chapter 26: LPC17xx Quadrature Encoder Interface (QEI)
6.3.6 QEI Index Count register (INXCNT - 0x400B C020)
This register contains the current value of the encoder position. Increments or decrements
when encoder counts occur, depending on the direction of rotation.
6.3.7 QEI Index Compare register (INXCMP - 0x400B C024)
This register contains an index compare value. This value is compared against the current
value of the index count register. Interrupts can be enabled to interrupt when the compare
value is less than, equal to, or greater than the current value of the index count register.
6.3.8 QEI Timer Reload register (QEILOAD - 0x400B C028)
This register contains the reload value of the velocity timer. When the timer (QEITIME)
overflows or the RESV bit is asserted, this value is loaded into the timer (QEITIME).
6.3.9 QEI Timer register (QEITIME - 0x400B C02C)
This register contains the current value of the velocity timer. When this timer overflows the
value of velocity counter (QEIVEL) is stored in the velocity capture register (QEICAP), the
velocity counter is reset to zero, the timer is reloaded with the value stored in the velocity
reload register (QEILOAD), and the velocity interrupt (TIM_Int) is asserted.
6.3.10 QEI Velocity register (QEIVEL - 0x400B C030)
This register contains the running count of velocity pulses for the current time period.
When the velocity timer (QEITIME) overflows the contents of this register is captured in
the velocity capture register (QEICAP). After capture, this register is set to zero. This
register is also reset when the velocity reset bit (RESV) is asserted.
Table 474: QEI Index Count register (CMPOS - address 0x400B C020) bit description
Bit
Symbol
Description
Reset
value
0:31
-
Current position value.
0
Table 475: QEI Index Compare register (CMPOS - address 0x400B C024) bit description
Bit
Symbol
Description
Reset
value
0:31
-
Current position value.
0
Table 476: QEI Timer Load register (QEILOAD - address 0x400B C028) bit description
Bit
Symbol
Description
Reset
value
0:31
-
Current velocity timer load value.
0
Table 477: QEI Timer register (QEITIME - address 0x400B C02C) bit description
Bit
Symbol
Description
Reset
value
0:31
-
Current velocity timer value.
0
Table 478: QEI Velocity register (QEIVEL - address 0x400B C030) bit description
Bit
Symbol
Description
Reset
value
0:31
-
Current velocity pulse count.
0