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.

TMS320F28379D: Position counter reset on nth Index event

Part Number: TMS320F28379D

Hello Experts ,

Is there any way to reset the position counter on the nth Index event.

We previously has a design where we convert a resolver's data into quadrature encoder signals and feed it to the MCU's eQEP peripheral. we reset the position counter on every raising edge on the index pulse. Every thing works well here!!

In terms of qep resolution: for 0 to 360 degrees of motor rotation, the position(QPOSCNT) changes from 0 to 4000 count.

But now we are using a multi-turn resolver, so for every single rotation of the motor shaft, we get two index pulses.

  • 0 to 180 degrees is equal to 0 to 4000 count(QPOSCNT). and
  • 181 to 360 degrees is equal to 0 to 4000 count(QPOSCNT).

Is there any way to reset the position counter only on the 2nd raising edge of index pulse?

  • Hi,

    There doesn't look to be a way to configure the reset on every other index pulse, the closest you could get would be to configure the PCRM to reset on the first index pulse, then configure the max position to be 8000. If you are able to use other peripherals, you could do this using the CLB peripheral by routing the index signal to the CLB through an INPUTXBAR and using it to increment a counter in the CLB, and when the counter hits 2, you can issue a pulse to the QEPI signal. If you're able to use the CLB, please let me know and I can explain in greater detail

    Regards,

    Peter