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.

TMS320F28069: extend QPOSCNT register

Genius 5910 points
Part Number: TMS320F28069


I need to extend the range of the eQEP QPOSCNT register.(from 32 to 48 bit) .counting up and down.

What is the good solution to do that?

I only find: Position counter overflow interrupt flag and Position counter underflow interrupt flag
Only I want a non interrupt solution.

Thanks,

EVS

  • EVS,

    Are you only looking to count more pulses than the timer has? Could you perhaps count only the rising edges? QDECCTL.bit.XCR = 1. This is applicable in Up-Count or Down-Count modes.

    Which mode of the eQEP are you using?

    -Mark
  • Mark,

    The application: There is a Master servo drive and a slave servo driver and they communicate between each other with quadrature encode signal. Only in 2 hour I run out of counts. So I have to extend the QPOSCNT  to 48 or 64 bits to solve this. I don't want to use QDECCTL.bit.XCR = 1 because then I lose resolution.

    Thanks,

    EVS

  • EVS,

    I think I understand that now.

    Underflow and overflow interrupts would give you a indefinite counter size as you would just increment/decrement on the overflow/underflow event. You could theoretically use up an entire RAM block if you never reset the counters.

    One thought might be to utilize the second EQEP module in the direction count mode which increments or decrements the counter based on a direction signal. you would need to somehow supply this information from the master side to be fed into the second EQEP. this would only give you an extra 2 bits, as instead of incrementing on every edge of both EQEPA and EQEPB, it will increment on the rising edge of EQEPA only.

    Thanks,
    Mark