QA
QB
QCLK
QDIR
QPOSCNT
OV/UF
QA
QB
QCLK
QDIR
QPOSCNT
OV/UF
1
2
3
4
0
1
2
1
0
4
3
2
1
0
4
3
2
1
2
3
4
0
1
0
4
3
2
1
0
1
2
3
4
0
1
2
3
4
0
1
0
4
3
4.1.3
Position Counter Reset on the First Index Event (QEPCTL[PCRM] = 10)
4.1.4
Position Counter Reset on Unit Time out Event (QEPCTL[PCRM] = 11)
www.ti.com
Position Counter and Control Unit (PCCU)
Figure 9. Position Counter Underflow/Overflow (QPOSMAX = 4)
If the index event occurs during forward movement, then the position counter is reset to 0 on the next
eQEP clock. If the index event occurs during the reverse movement, then the position counter is reset to
the value in the QPOSMAX register on the next eQEP clock. Note that this is done only on the first
occurrence and subsequently the position counter value is not reset on an index event; rather, it is reset
based on maximum position as described in Section
First index marker is defined as the quadrature edge following the first index edge. The eQEP peripheral
records the occurrence of the first index marker (QEPSTS[FIMF]) and direction on the first index event
marker (QEPSTS[FIDF]) in QEPSTS registers, it also remembers the quadrature edge on the first index
marker so that same relative quadrature transition is used for software index marker (QEPCTL[IEL]=11).
In this mode, the QPOSCNT value is latched to the QPOSLAT register and then the QPOSCNT is reset
(to 0 or QPOSMAX, depending on the direction mode selected by QDECCTL[QSRC] bits on a unit time
event). This is useful for frequency measurement.
SPRUG05A – August 2008 – Revised December 2008
Enhanced QEP (eQEP) Module
19