Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: LVSERVOMTR
Hello experts,
the initialization of the encoders:
QDECCTL = 0x0000; //Quadrature Count Mode
QEPCTL[FREE_SOFT] =2;
QEPCTL[PCRM] = 0; //Position Counter Reset on Index Event
QEPCTL[IEI] = 0; //No init of position count on index event
QEPCTL[IEL] = 0x3; //Latch on index event marker
QPOSMAX = 4000-1; //Encoder1
//QPOSMAX = 10000-1; //Encoder2
It was tested on 2 different encoder types (see picture).

The problem:
At each reversal of direction the error "Position Counter Error" (QFLG[PCE]=1) occurs. The phenomenon can be seen on both encoders. Additionally with encoder 2 this error occurs from time to time with the movement direction "Counter Clockwise", although there is no change of the movement direction here. Is it a mistake of my initialization or an error of the two encoders or a general behavior of F2837x?
I also noticed that the interrupt "Index event latch interrupt" (QFLG[IEL]) and latching of QPOSCNT is only possible in the operation mode "Position Counter Reset on Index Event" (QEPCTL[PCRM] = 00). In the other operation modes (QEPCTL[PCRM] = 01, 10, 11) neither the interrupt (QFLG[IEL]) nor the latching of QPOSCNT are possible, no matter how the encoder is initialized. Is what I found correct?
Do you have any hints or tips for me?
Thanks in advance - Bui
