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.

TMS320F2800137: T method low speed for eQEP issue?

Part Number: TMS320F2800137

Hi Experts,

Customer use eQEP to do T method low speed. But they found that the calculated speed is abnormal when actual speed is 10RPM.  They use QEPSTS.UPEVNT to indicate count value between two impulse. But when speed very low at 10 RPM, the QCTMR will exceed 0xFFFF. They will use QEPSTS.COEF to distinguish the real count value. If QEPSTS.UPEVNT = 1 and QEPSTS.COEF = 1, they will use software counting to replace Timer. So this method will decide the timeout of QEPSTS.COEF. But we tested the calculated speed is abnormal when actual speed is 10RPM. Do you have any suggestion? How to deal with the Capture Timer when QEPSTS.COEF = 1? Thanks.

  • Hi Shaoxing,

    If running at lower speeds, could you change the pre-scalar to slow down the rate at which the encoder counts? What is your pre scalar set to? Would there be a value that can capture both low speeds + higher speeds?

    Best,

    Ryan Ma

  • Hi Ryan,

    Right. Because they encoder is 64 line, so clock is setup 1/128. 

    We tested that EQep1Regs.QEPSTS.bit.COEF this bit will not work normally under low speed. Could you help to explain that will COEF be cleared by anything? Thanks.

    EQep1Regs.QDECCTL.bit.SWAP = 0;  //AB相不交换
    EQep1Regs.QEPCTL.bit.FREE_SOFT=2;//调试中断时不复位QEP
    EQep1Regs.QEPCTL.bit.PCRM=1;     //当达到最大位置时复位
    EQep1Regs.QEPCTL.bit.UTE=1;      // Unit Timeout Enable
    EQep1Regs.QEPCTL.bit.QCLM=1;     //单位时间事件发生时锁存数据
    EQep1Regs.QEPCTL.bit.QPEN=1;     //QEP enable
    EQep1Regs.QCAPCTL.bit.UPPS=1;     // QCLK/2
    EQep1Regs.QCAPCTL.bit.CCPS=7;     // 1/128 for CAP clock
    EQep1Regs.QCAPCTL.bit.CEN=1;      // QEP Capture Enable
    EQep1Regs.QUPRD=100000;           //1ms定时

    EQep1Regs.QEINT.bit.IEL =0;      //禁止Index中断

    EQep1Regs.QEINT.bit.UTO = 0;     //禁止UTO测速中断

  • Hi Shaoxing,

    Can you set the QDECCTL.XCR to be 1x resolution, see if that helps prevent overflow?

    Best,

    Ryan Ma

  • Hi Ryan,

    It is still overflow, this bit just selects pulse edge. 

    Any more suggestion?

    Thanks.

  • Hi Ryan,

    Could we use CLB to achieve eQEP for low speed calculation? Do we have any reference example here. Thanks.

  • Hi Shaoxing,

    Would it be possible for the customer to use the eCAP module to capture the edges at extremely low speeds?