The position counter can be initialized using the
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 is 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 the bit again, the position counter is re-initialized.