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: CLB output signal to QEP

Part Number: TMS320F28379D

Dear team:

One of my clients conducted the following experiments:

Method 1: Use CLB to generate a pulse signal PULSE and direction signal DIR. The signal is output through GPIO and then connected to the QEP A/B pin to be able to count normally.

Method 2: The QEP configuration remains unchanged in Method 1, except that when QDIR and QCLK are internally connected, QEP cannot be counted (QPOSCNT is always zero). The contact signal between CLB and QEP is as follows:

QDIR is the same as the DIR waveform in Method 1; QCLK is the pulse at the moment of the falling edge of the PULSE signal in Method 1, with a width of 10ns. The realization is through the new configuration statement: Clb1LogicCtrlRegs.CLB_OUT_EN = 3<<10; In this way, QEP cannot realize counting (QPOSCNT is always zero)

Please help analyze what caused the method 2 to not count?

Best regards

  • Hi,

    Simply by connecting the QCLK and QDIR position counter in QEP module will count in this mode.
    If you are generating the QCLK and QDIR signals inside the CLB module, you can as well implement the counter inside the CLB.

  • Hi,

    There is additional logic inside the QEP which relies on inputs (not just the QCLK/DIR port locations) driven by CLB.
    That's the reason for suggesting to implement counter inside CLB.

  • Dear Subrahmanya:

    Thank you for your reply.

    Would you please share the complete configuration method(QEP is driven by CLB), my customer want to test the code.

    Best regards

  • Hi, 

    You can do similar to Method 1. Keep similar QEP configuration in Method 2 as well but signals generated by CLB can be connected to QA, QB inputs (not QCLK, QDIR).
    Also, note that the count may be double the expected value, because CLB operates at half the frequency of QEP.