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.

Piccolo 28035 eQEP problem



I'm using a Piccolo 28035 for a PMSM drive application.  I'm able to spin the motor, and now I'm trying to get the encoder to run.  We have successfully run the encoder on the 2808, but I cannot get the encoder to produce the expected results on the 28035 using the QEP macros supplied in the TI motor control library.  My QEP control register initializations are as follows:

QDECCTL = 0x0000  (2x resolution, quad operation)

QEPCTL = 0x821E  (unaffected by emulation suspend, reset on index, POSCNT init on index, POSCNT latched on index, POSCNT enabled, unit timer enabled)

QPOSCTL = 0x0000  (position compare disabled)

QCAPCTL = 0x8075  (UPEVNT = QCLK/32, CAPCLK = SYSCLKOUT/128, eQEP capture unit enabled)

QUPRD = 600000  (unit timer for 100Hz)

I have verified that the QEP signals are clean, A and B signals are in quadrature, and the index occurs once every revolution.  I've also reviewed the literature to verify the settings make sense.  Unfortunately, the processor is behaving as if it receives an index event every few quadrature pulses instead of every revolution, so QPOSCNT gets reset to QPOSINIT every few pulses, and QPOSILAT gets latched as well.  I've verified that the signals are routed to the correct pins, (GPIO20=EQEP1A, GPIO21=EQEP1B, GPIO23=EQEP1I).  I've tried it in the lab with an encoder, and at my desk using the control card while manually applying the pulses, with consistent (incorrect) results.  I've even changed out the control cards to be sure I don't have a bad one. 

QPOSCNT counts up as expected if I set QEPCTL.PCRM = 1 (reset on max position instead of index) and QEPCTL.IEI = 0 (POSCNT not initialized on index).  However, I cannot work with this as a solution because I need the index pulse to sync to.

Any suggestions?

Thanks in advance.  This has been very frustrating.

  • Update.  It now appears the module is working using the "manual" method of toggling the A,B, and I pins using external jumpers to temporarily ground them (they are configured to be pulled up, so I can simulate pulses by disconnecting from ground, then reconnecting them in the proper sequence).

    Therefore, it must be a signal conditioning issue in the interface to the encoder.  Apparently spurious edges are being injected into the index signal.