F9C
F9D
F9E
F9F
FA0
FA1
FA2
FA3
FA4
FA5
FA4
FA3
FA2
FA1
FA0
F9F
F9E
F9D
F9C
F9B
F9A
F99
F98
F97
F9F
F9F
QA
QB
QS
QCLK
QEPST:QDF
QPOSCNT
QIPOSSLAT
Position Counter and Control Unit (PCCU)
833
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
C28 Enhanced QEP (eQEP) Module
9.4.2.2
Strobe Event Latch
The position-counter value is latched to the QPOSSLAT register on the rising edge of the strobe input by
clearing the QEPCTL[SEL] bit.
If the QEPCTL[SEL] bit is set, then the position counter value is latched to the QPOSSLAT register on the
rising edge of the strobe input for forward direction and on the falling edge of the strobe input for reverse
direction as shown in
The strobe event latch interrupt flag (QFLG[SEL) is set when the position counter is latched to the
QPOSSLAT register.
Figure 9-11. Strobe Event Latch (QEPCTL[SEL] = 1)
9.4.3 Position Counter Initialization
The position counter can be initialized using following events:
•
Index event
•
Strobe event
•
Software initialization
Index Event Initialization (IEI)—
The QEPI index input can be used to trigger the initialization of the
position counter at the rising or falling edge of the index input. If the QEPCTL[IEI] bits are 10, then
the position counter (QPOSCNT) is initialized with a value in the QPOSINIT register on the rising
edge of index input. Conversely, if the QEPCTL[IEI] bits are 11, initialization will be on the falling
edge of the index input.
Strobe Event Initialization (SEI)—
If the QEPCTL[SEI] bits are 10, then the position counter is initialized
with a value in the QPOSINIT register on the rising edge of strobe input.
If QEPCTL[SEL] bits are 11, then the position counter is initialized with a value in the QPOSINIT
register on the rising edge of strobe input for forward direction and on the falling edge of strobe
input for reverse direction.
Software Initialization (SWI)—
The position counter can be initialized in software by writing a 1 to the
QEPCTL[SWI] bit. This bit is not automatically cleared. While the bit is still set, if a 1 is written to it
again, the position counter will be re-initialized.