7.5.1.1 Position Counter Reset on Index Event (QEPCTL[PCRM]=00)
If the index event occurs during the 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.
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 index event reset operation.
For example, if the first reset operation occurs on the falling edge of QEPB during the forward direction, then all
the subsequent reset must be aligned with the falling edge of QEPB for the forward rotation and on the rising
edge of QEPB for the reverse rotation as shown in
The position-counter value is latched to the QPOSILAT register and direction information is recorded in the
QEPSTS[QDLF] bit on every index event marker. The position-counter error flag (QEPSTS[PCEF]) and error
interrupt flag (QFLG[PCE]) are set if the latched value is not equal to 0 or QPOSMAX. The position-counter error
flag (QEPSTS[PCEF]) is updated on every index event marker and an interrupt flag (QFLG[PCE]) will be set on
error that can be cleared only through software.
The index event latch configuration QEPCTL[IEL] must be configured to '00' or '11' when pcrm=0 and the
position counter error flag/interrupt flag are generated only in index event reset mode. The position counter value
is latched into the IPOSLAT register on every index marker.
Figure 7-8. Position Counter Reset by Index Pulse for 1000 Line Encoder (QPOSMAX = 3999 or 0xF9F)
Note
In case of a boundary condition where the time period between the Index Event and the previous
QCLK edge is less than SYSCLK period, then QPOSCNT gets reset to zero or QPOSMAX in the
same SYSCLK cycle and does not wait for the next QCLK edge to occur.
Enhanced Quadrature Encoder Pulse (eQEP)
472
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......