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.

TMS320F28377D: Index signal of QEP module

Part Number: TMS320F28377D

Hi team,

Here's an issue from the customer may need your help:

Using the qep module of DSP in motor control requires the use of qep to locate an absolute angle.

Based on observations, the entered z signal (index) is normal. However, by changing the variables set in the IEL flag bits, some positions are mistouched, that is, there is no z signal input but DSP thinks there is an input.

The configuration of the program is good and the only difference from the manual is that the z signal is pulsed high. In the test, the inverter was used, so the z signal corresponds to a low pulse. The rising and falling edge detection of the z signal have been tried and basically no difference.

The test structure is as follows:

The bottom waveform in the figure above is the z-pulse signal input to DSP, and it can be seen that the distribution is even and normal.

In the middle, however, the z signal is recognized in the program and the output level is inverted. You can see that there is also an inversion of the z signal where there is no z signal, that is, the z signal is falsely touched.

Could you help check this case? Thanks.

Best Regards,

Cherry

  • Hi,

    Due to Thanksgiving Holiday, the subject matter expert is out of office. We will get back to you next week.

    Thanks & Regards,
    Santosh

  • Hi Cherry,

    changing the variables set in the IEL flag bits, some positions are mistouched

    Can you describe how the eQEP module is configured? Specifically, what IEL bits are you referring to when you say this?

    Is the customer using input qualification on the Z signal? With issues regarding the index input, this is sometimes mitigated by enabling GPIO software qualification, which may be helpful even if the index signal appears to be clear. Please let me know if the customer can experiment with enabling this setting in their system

    Regards,

    Peter

  • Hi Peter,

    Thanks for your support.

    An IEL of 1 or 2 has been tried, using the rising and falling edges of the z signal to trigger the latching of the position counter. Therefore, the variable with the count set in the flag register EQep1Regs.QFLG.bit.IEL is used to observe if the z signal is accurately recognized by DSP.

    The QEP registers is configured as follows:

    EQep1Regs.QUPRD = 200000; //1kHz
    
    EQep1Regs.QDECCTL.bit.QSRC = 0x00; //Quadrature Count Mode
    
    EQep1Regs.QEPCTL.bit.FREE_SOFT = 2;
    EQep1Regs.QEPCTL.bit.PCRM = 01; //maximum position
    EQep1Regs.QEPCTL.bit.UTE = 1; // Unit Timeout Enable
    EQep1Regs.QEPCTL.bit.QCLM = 1; // Latch on unit time out
    EQep1Regs.QEPCTL.bit.QPEN = 1; //QEP enable、
    
    EQep1Regs.QEPCTL.bit.IEI = 10;
    // EQep1Regs.QFLG.bit.UTO = 1;
    
    EQep1Regs.QEPCTL.bit.IEL = 1; //Both 1 and 2 were tested separately 
    
    EQep1Regs.QPOSINIT = 0;
    
    EQep1Regs.QPOSMAX = 9999; //maximum position counter value 9999
    
    EQep1Regs.QCAPCTL.bit.UPPS = 5; //UPEVNT=QCLK/32
    EQep1Regs.QCAPCTL.bit.CCPS = 7; //CAPCLK=SYSCLKOUT/128
    EQep1Regs.QCAPCTL.bit.CEN = 1; //Qep Capture Enable

    Is the customer using input qualification on the Z signal?

    Is the "input qualification" also implemented through register configuration? 

    Thanks and regards,

    Cherry

  • Hi Cherry, 

    Thank you for providing the configuration. Please allow me time to read through this issue and see what can be done to alleviate this

    Is the "input qualification" also implemented through register configuration? 

    This input qualification should be done through the GPIO register configuration for the GPIO assigned to the index signal

    Regards,

    Peter

  • I do not see any issues in the eQEP configuration that may result in this. Have you tried the software option for IEL? What results are being seen with this? Can you report back also what happens when qualification is enabled for the index signal?

    Regards,

    Peter

  • Hi Peter,

    Have you tried the software option for IEL?

    Does the software option for IEL mean setting the IEL to 3? If so, they haven't tried it yet. How to configure it with software? The software configuration should be based on the fact that the software recognizes the index signal? 

    Can you report back also what happens when qualification is enabled for the index signal?

    What dose "qualification is enabled for the index signal" mean?  Is there any documentations available for reference? 

    Thanks and regards,

    Cherry

  • Hi Cherry,

    Does the software option for IEL mean setting the IEL to 3? If so, they haven't tried it yet. How to configure it with software? The software configuration should be based on the fact that the software recognizes the index signal?

    Yes this is correct, IEL should be set to 3 for the software based. This mode stores the first index marker and direction on first index event, and the relative position of the index signal to the other quadrature signals to support subsequent index events.

    What dose "qualification is enabled for the index signal" mean?  Is there any documentations available for reference? 

    Information on this can be found in the GPIO section of the TRM. By qualification, I mean using the sampling window functionality, as other customers have reported using this has resolved their index signal issues

    Regards,

    Peter