This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Use of QPOSILAT in EQEP module in HERCULES TMS570LC4357

Hi guys,

I have doubts regarding the usage of the QPOSILAT register.I am using a rotary encoder and i want to count the number of ticks and revolution the encoder makes. I am able to get the values of number of ticks using the 

QPOSLAT register and i have set the max count to 3600. I am not able to count the number of revolution by a simple if function :---> if(ticks==3600)  { revolution++;} .I am encountering the problem that the if the encoder is not able to read the 3600th ticks  (in case it misses some of the ticks as sensors do have some limitations ) i get wrong values for revolutions.I need help regarding this issue whether using the register QPOSILAT would give me the numbers of the times it has sensed the index event and directly give me the revolution value.

regards,

Mukesh kumar 

  • Hello Mukesh,

    I don't understand what you have doubts on. You have doubts that the QPOSLAT register is an accurate representation on the number of indexes that have been detected? You stated that it seems as though you have missed the 3600th index and, therefore, loosing count of the revolutions. Can you put a scope on your sensor output as the encoder is running to see if this is a sensor issue or an issue with the logic internal to the device. If it is a sensor malfunction and no pulse is provided to the eQEP, I'm not certain what can be done about it other than to recommend adding some error condition code to your SW so that you can compensate for missed pulses.
  • I am confused about the function of QPOSILAT register. I want to know what value does it latches out?
  • Hello Mukesh,

    Sorry for the delayed response.

    The QPOSILAT register will latch the content of the QPOSCNT register on either the rising or falling edge of an index input. The selection of rising or falling edge is configured through the QEPCTL[IEL] register where QEPCTL[IEL]=01 is falling edge and QEPCTL[IEL]=10 is rising edge.