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.

TMS570LS1224: the problem is about qep index event setting

Part Number: TMS570LS1224

Dear every one:

I have a question about tms570 qep module. I want to know  that when QEPCTL->IEI can be used.

Because when setting reset on index event that will cause twice reset, one is QEPI, another is index event.

So if QEPCTL->IEI is not use for reset on index event mode, which mode is useful?

Or I misinterpret the datasheet, that is not useful in index event mode? 

The encoder signal use PGA411 output A, B, I signal. 

QEP setting on below

1. QEPCTL->PCRM : Position counter reset on an index event

2. QEPCTL->IEI : Initializes the position counter on the rising edge of the QEPI signal

when the motor is run I found that setting causes twice reset.

thanks for reply.

  • Hello Lin,

    The IEI (bit 9-8) is only used to initialize the position counter, and it wont reset this counter.
  • Hi Wang,

    thanks for your reply.
    So if I set this bit(IEI), QPOSINIT register is 0 and in the index event mode.
    When I turn the motor run, the index event will reset the position counter
    and QEPI signal will initialize the position counter. That why cause second time to 0

    If I misinterpret, please tell me.

    thanks very mach.
  • The QEPI index input can be used to trigger the initialization of the position counter at the rising or falling edge of the index input. If the QEPCTL[IEI] bits are b10, then the position counter (QPOSCNT) is initialized with a value in the QPOSINIT register on the rising edge of index input. Conversely, if the QEPCTL[IEI] bits are b11, initialization will be on the falling edge of the index input.

    Reset is a bit different from initialization. The init here is to load the value in QPOSINIT and write to QPOSCNT. If QPOSCNT is 0, then the init has the same result as reset.

    I assume you have resolved the issue.