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.

TMS570LC4357: eQEP POSCNT results not as expected

Part Number: TMS570LC4357

Hi,

Using the eQEP2 peripheral to determine absolute position with POSCNT:

QEPA and QEPB are connected to Hall effect sensor delivering 2 clean square signals with 60° phase shift and period of 700 microseconds minimum. Purpose is to get absolute position cumulated count after initialization to 0x80000000.  Mode used is  QUADRATURE_COUNT without index event nor strobe. Vclk is 25 MHz.

Position is read every 10 ms cycle. I noticed discrepancies compared to a reference value (see curve below - purple = ref, blue dashed = eQEP value, vertical scale is a position in millimeters, time scale is in seconds):

- reduced increments between 2 cycles (-1, 0 , +1, rarely-2 or +2 ) whereas I expected up to -6 to + 6 increment values between 2 successive reads considering real rotating speed.

- multiple inversions of incremental direction when rotating speed is higher and whereas no direction changes in real 

Has someone any idea of check points in my configuration regarding these symptoms?

Regards

Xav

  • Hi Xav,

    The images did not get uploaded. Please try to upload them again.

    What is the VCLK3 domain frequency? This is divided down from HCLK independent of the peripheral clock domain (VCLK) frequency.

    Regards,

    Sunil

  • Hi Sunil

    I mean Vclk3 = 25 MHz (typo error). Here you will find the data

    Xav

    Note: evol (mm) =QEPCNT*0.0315. Extract of curves data around 7s and 7,5s when direction begin to be false.

    TIME REFERENCE evol % evol (mm) eQEP source evol % evol (mm) DIRECTION
    7,02 -2,60E-01 1,00%          0,02000   6,11E-02 1,57%     0,03149   OK
    7,03 -2,20E-01 2,00%          0,04000   6,11E-02 0,00%              -     OK
    7,04 -2,20E-01 0,00%                      -     9,26E-02 1,57%    0,03149   OK
    7,05 -1,80E-01 2,00%          0,04000   9,26E-02 0,00%              -     OK
    7,06 -1,80E-01 0,00%                      -     9,26E-02 0,00%              -     OK
    7,07 -1,00E-01 4,00%          0,07999   1,56E-01 3,15%    0,06299   OK
    7,08 -1,00E-01 0,00%                      -     1,56E-01 0,00%              -     OK
    7,09 -2,00E-02 4,00%          0,08000   2,19E-01 3,15%    0,06299   OK
    7,1 -2,00E-02 0,00%                      -     2,19E-01 0,00%              -     OK
    7,11 0,00E+00 1,00%          0,02000   2,50E-01 1,57%    0,03149   OK
    7,12 2,00E-02 1,00%          0,02000   2,50E-01 0,00%              -     OK
    7,13 8,00E-02 3,00%          0,06000   2,82E-01 1,57%    0,03149   OK
    7,14 1,40E-01 3,00%          0,06000   3,13E-01 1,57%    0,03149   OK
    7,15 1,80E-01 2,00%          0,03999   3,45E-01 1,57%    0,03149   OK
    7,16 1,80E-01 0,00%                      -     3,45E-01 0,00%              -     OK
    7,17 2,60E-01 4,00%          0,08000   3,76E-01 1,57%    0,03149   OK
    7,18 3,20E-01 3,00%          0,06000   4,08E-01 1,57%    0,03149   OK
    7,19 3,40E-01 1,00%          0,02000   4,39E-01 1,57%    0,03149   OK
    7,2 3,60E-01 1,00%          0,01999   4,39E-01 0,00%              -     OK
    7,21 4,20E-01 3,00%          0,06001   4,39E-01 0,00%              -     OK
    7,22 5,00E-01 4,00%          0,08000   4,39E-01 0,00%              -     OK
    7,23 5,00E-01 0,00%                      -     4,08E-01 -1,57% -   0,03149   OK
    7,24 6,60E-01 8,00%          0,15997   3,76E-01 -1,57% -   0,03149   ERR
    7,25 7,00E-01 2,00%          0,04001   4,08E-01 1,57%    0,03149   OK
    7,26 8,00E-01 5,00%          0,10001   3,76E-01 -1,57% -   0,03149   ERR
    7,27 9,40E-01 7,00%          0,13998   3,76E-01 0,00%              -     OK
    7,28 1,08E+00 7,00%          0,13998   3,76E-01 0,00%              -     OK
    7,29 1,18E+00 5,00%          0,10004   3,76E-01 0,00%              -     OK
    7,3 1,24E+00 3,00%          0,06000   3,45E-01 -1,57% -   0,03149   ERR
    7,31 1,36E+00 6,00%          0,12000   3,13E-01 -1,57% -   0,03149   ERR
    7,32 1,40E+00 2,00%          0,03998   2,82E-01 -1,57% -   0,03149   ERR
    7,33 1,48E+00 4,00%          0,08002   2,50E-01 -1,57% -   0,03149   ERR
    7,34 1,56E+00 4,00%          0,08002   2,19E-01 -1,57% -   0,03149   ERR
    7,35 1,62E+00 3,00%          0,06000   1,87E-01 -1,57% -   0,03149   ERR
    7,36 1,66E+00 2,00%          0,03998   1,56E-01 -1,57% -   0,03149   ERR
    7,37 1,72E+00 3,00%          0,06000   1,24E-01 -1,57% -   0,03149   ERR
    7,38 1,78E+00 3,00%          0,06000   9,26E-02 -1,57% -   0,03149   ERR
    7,39 1,82E+00 2,00%          0,03998   1,24E-01 1,57%    0,03149   OK
    7,4 1,82E+00 0,00%                      -     1,24E-01 0,00%              -     OK
    7,41 1,84E+00 1,00%          0,02002   1,56E-01 1,57%    0,03149   OK
    7,42 1,84E+00 0,00%                      -     1,56E-01 0,00%              -     OK
    7,43 1,84E+00 0,00%                      -     1,56E-01 0,00%              -     OK
  • Hi Xav,

    Can you upload your code configuring the eQEP and reading from the eQEP?

    Regards, Sunil

  • Hi Sunil

    We modified some code (eQEP configuration and count initialization procedure) and the eQEP works perfectly now. So we are out of trouble (no hw faulty, only sw: that was my greatest fear).

    But we have now  to analyse and understand why it didn't work before. I propose  you to put the discussion in stand by and I will go back to you with the right explanation in few days.

    Thank you

    Xav

  • Thanks for the update Xav. I will close this thread for now.

    Regards, Sunil