Datasheet
Figure 29-2. QEI Input Signal Logic
Quadrature
Encoder
PhAn
PhBn
QEICTL.SWAP
0
1
0
1
PhA
PhB
QEICTL.INVA
QEICTL.INVB
QEICTL.SWAP
clk
dir
29.2 Signal Description
The following table lists the external signals of the QEI module and describes the function of each.
The QEI signals are alternate functions for some GPIO signals and default to be GPIO signals at
reset. The column in the table below titled "Pin Mux/Pin Assignment" lists the possible GPIO pin
placements for these QEI signals. The AFSEL bit in the GPIO Alternate Function Select
(GPIOAFSEL) register (page 801) should be set to choose the QEI function. The number in
parentheses is the encoding that must be programmed into the PMCn field in the GPIO Port Control
(GPIOPCTL) register (page 818) to assign the QEI signal to the specified GPIO port pin. For more
information on configuring GPIOs, see “General-Purpose Input/Outputs (GPIOs)” on page 771.
Table 29-1. QEI Signals (212BGA)
DescriptionBuffer TypePin TypePin Mux / Pin
Assignment
Pin NumberPin Name
QEI module 0 index.TTLIPL3 (6)
PS6 (6)
J18
U10
IDX0
QEI module 0 phase A.TTLIPL1 (6)
PS4 (6)
H19
V9
PhA0
QEI module 0 phase B.TTLIPL2 (6)
PS5 (6)
G18
T13
PhB0
29.3 Functional Description
The QEI module interprets the two-bit gray code produced by a quadrature encoder wheel to integrate
position over time and determine direction of rotation. In addition, it can capture a running estimate
of the velocity of the encoder wheel.
The position integrator and velocity capture can be independently enabled, though the position
integrator must be enabled before the velocity capture can be enabled. The two phase signals,
December 13, 20132012
Texas Instruments-Advance Information
Quadrature Encoder Interface (QEI)