Enhanced Quadrature Encoder Pulse (eQEP) Module
15.4.2.3.1.2 Direction-count Mode
Some position encoders provide direction and clock outputs, instead of quadrature outputs. In such cases,
direction-count mode can be used. QEPA input will provide the clock for position counter and the QEPB
input will have the direction information. The position counter is incremented on every rising edge of a
QEPA input when the direction input is high and decremented when the direction input is low.
15.4.2.3.1.3 Up-Count Mode
The counter direction signal is hard-wired for up count and the position counter is used to measure the
frequency of the QEPA input. Setting of the XCR bit in the eQEP decoder control register (QDECCTL)
enables clock generation to the position counter on both edges of the QEPA input, thereby increasing the
measurement resolution by 2× factor.
15.4.2.3.1.4 Down-Count Mode
The counter direction signal is hardwired for a down count and the position counter is used to measure the
frequency of the QEPA input. Setting of the XCR bit in the eQEP decoder control register (QDECCTL)
enables clock generation to the position counter on both edges of a QEPA input, thereby increasing the
measurement resolution by 2× factor.
15.4.2.3.2 eQEP Input Polarity Selection
Each eQEP input can be inverted using the in the eQEP decoder control register (QDECCTL[8:5]) control
bits. As an example, setting of the QIP bit in QDECCTL inverts the index input.
15.4.2.3.3 Position-Compare Sync Output
The eQEP peripheral includes a position-compare unit that is used to generate the position-compare sync
signal on compare match between the position counter register (QPOSCNT) and the position-compare
register (QPOSCMP). This sync signal can be output using an index pin or strobe pin of the EQEP
peripheral.
Setting the SOEN bit in the eQEP decoder control register (QDECCTL) enables the position-compare
sync output and the SPSEL bit in QDECCTL selects either an eQEP index pin or an eQEP strobe pin.
15.4.2.4 Position Counter and Control Unit (PCCU)
The position counter and control unit provides two configuration registers (QEPCTL and QPOSCTL) for
setting up position counter operational modes, position counter initialization/latch modes and position-
compare logic for sync signal generation.
15.4.2.4.1 Position Counter Operating Modes
Position counter data may be captured in different manners. In some systems, the position counter is
accumulated continuously for multiple revolutions and the position counter value provides the position
information with respect to the known reference. An example of this is the quadrature encoder mounted on
the motor controlling the print head in the printer. Here the position counter is reset by moving the print
head to the home position and then position counter provides absolute position information with respect to
home position.
In other systems, the position counter is reset on every revolution using index pulse and position counter
provides rotor angle with respect to index pulse position.
Position counter can be configured to operate in following four modes
•
Position Counter Reset on Index Event
•
Position Counter Reset on Maximum Position
•
Position Counter Reset on the first Index Event
•
Position Counter Reset on Unit Time Out Event (Frequency Measurement)
1658
Pulse-Width Modulation Subsystem (PWMSS)
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated