7.5.1.4 Position Counter Reset on Unit Time out Event (QEPCTL[PCRM] = 11)
In this mode, QPOSCNT is set to 0 or QPOMAX, depending on the direction mode selected by
QDECCTL[QSRC] bits on a unit time event. This is useful for frequency measurement.
7.5.2 Position Counter Latch
The eQEP index and strobe input can be configured to latch the position counter (QPOSCNT) into QPOSILAT
and QPOSSLAT, respectively, on occurrence of a definite event on these pins.
7.5.2.1 Index Event Latch
In some applications, it may not be desirable to reset the position counter on every index event and instead it
may be required to operate the position counter in full 32-bit mode (QEPCTL[PCRM] = 01 and QEPCTL[PCRM]
= 10 modes).
In such cases, the eQEP position counter can be configured to latch on the following events and direction
information is recorded in the QEPSTS[QDLF] bit on every index event marker.
• Latch on Rising edge (QEPCTL[IEL]=01)
• Latch on Falling edge (QEPCTL[IEL]=10)
• Latch on Index Event Marker (QEPCTL[IEL]=11)
This is particularly useful as an error checking mechanism to check if the position counter accumulated the
correct number of counts between index events. As an example, the 1000-line encoder must count 4000 times
when moving in the same direction between the index events.
The index event latch interrupt flag (QFLG[IEL]) is set when the position counter is latched to the QPOSILAT
register. The index event latch configuration bits (QEPCTZ[IEL]) are ignored when QEPCTL[PCRM] = 00.
Latch on Rising Edge
(QEPCTL[IEL]=01)
The position-counter value (QPOSCNT) is latched to the QPOSILAT register
on every rising edge of an index input.
Latch on Falling Edge
(QEPCTL[IEL] = 10)
The position-counter value (QPOSCNT) is latched to the QPOSILAT register
on every falling edge of index input.
Latch on Index Event
Marker/Software Index Marker
(QEPCTL[IEL] = 11
The 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 the QEPSTS registers. It also remembers the quadrature
edge on the first index marker so that same relative quadrature transition is
used for latching the position counter (QEPCTL[IEL]=11).
shows the position counter latch using an index event marker.
Enhanced Quadrature Encoder Pulse (eQEP)
474
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......