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.

TMS320F280039C: Use EQEP-inputA only as 1-pin pulse counter

Part Number: TMS320F280039C
Other Parts Discussed in Thread: C2000WARE

Dear Champs,

I am asking this for our customer.

The user wants to use 1-pin pulse counter for simple fan control during a period of time for simple fan speed control.

That is, only Input A or Input B is used to counter pulse during a time period without using the other 3 EQEP pins. 

And the user can save the other EQEP pins for other purposes.

Question:

1. If EQEP is used as Quadrature-clock mode, can the user user only one pin, say EQEP-inputA, to count pulse?

2. If EQEP is used as Direction-count mode, can the user user only one pin, say EQEP-inputA, to count pulse? That is, EQEP-inputB is set as high or low "internally" without needing to add an external high/low.

  • Hi Wayne,

    For the 1-pin pulse counter, could the customer instead use the eCAP peripheral instead?

    The benefit of using eCAP can be used to capture a single signal pin, count the number of pulses based on a rising / falling edge event. Also this will not require you to use eQEP and save two pins for other uses.

    To answer your other questions, yes you can use only one pin (EQEPA) to count pulse in either those modes. However you'll have 2 pins (eQEPB/eQEPI) that will not be used.

    Beset,

    Ryan Ma

  • Dear Ryan,

    In this case, the user has run short of eCAP for other purposes, so they could not use eCAP, unfortunately.

    Would you please make it clearer by "To answer your other questions, yes you can use only one pin (EQEPA) to count pulse in either those modes. However you'll have 2 pins (eQEPB/eQEPI) that will not be used."?

    What does that mean by "However you'll have 2 pins (eQEPB/eQEPI) that will not be used."?

    The user only wants to get the pulse count every a period of time by eQEP ISR and use only one input pin.

    Would you please confirm if they could use eQEP in this way by using only one physical pin with all other dummy internal setting for eQEP?

  • Hi Wayne,

    Apologize for the confusion, yes they could use the eQEP by only using one physical pin and then use dummy internal setting for eQEP.

    Best,

    Ryan Ma

  • Dear Ryan,

    The user is asking further.

    To use 1 physical pin QEP to count pulse,

    1. The user can use only 1 physical QEPA. You confirmed this in the last post.

    2. Can the user user only 1 physical QEPB to count pulse as well?

    3. Can the user user only 1 physical QEPI to count pulse as well? Can index be used in this way?

    The user is thinking to have more pinmux flexibility for pin usage because they need to use many pins.

    4. Ex1/Ex4 can be viewed as examples for using only 1 physical QEPA. Is my understanding correct?

    C:\ti\c2000\C2000Ware_5_00_00_00\driverlib\f28003x\examples\eqep

  • Hi Wayne,

    Is the customer planning to by pass the Quadrature decoder as shown below?

    Then feed this to the Position counter? What are the settings they are wanting to use in the position counter?

    Depending on the setup they cannot use QEPI if they were planning to reset the position counter based on index.

    Best,

    Ryan Ma

  • Dear Ryan,

    The user only wants to use 1 pin for pulse count and want some flexibility for pinmux because pins for QEPA are fixed.

    From your figure above, it seems only 1-pin QEPA can be used for pulse count.

    Is my understanding correct?

  • Yes that is correct, you can only use 1 pin for pulse count. eQEPA can be used to aggregate the position count since that will become QCLK. eQEPB will be used as QDIR in which you have tied to some value. QEPI, will be used as QI for the case you want to use that as the position counter latch.

    Best,

    Ryan Ma

  • 1. If EQEP is used as Quadrature-clock mode, can the user user only one pin, say EQEP-inputA, to count pulse?

    2. If EQEP is used as Direction-count mode, can the user user only one pin, say EQEP-inputA, to count pulse? That is, EQEP-inputB is set as high or low "internally" without needing to add an external high/low.

    Also in this method, if you're using the eQEP in quadrature clock mode. The user can only use one pin. If eQEP is used in direction count mode, the user can use eQEPA and set EQEPB high or low without needing to add external high/low.

  • Dear Ryan,

    In Figure 23-22. QMA Module Block Diagram in 23.9 QMA Module of TRM, it seems QEPA_pin and QEPB_pin can be swapped so that it appears either 1-pin QEPA or 1-pin QEPB can be used to count the pulse.

    Would you please confirm again if only 1-pin QEPB can be used to counter the pulse? That is, Pin EQEP-input B is used as pulse input and EQEP-input A is set as high/low internally using QMACTRL.MODE = 2 (QMA mode-2).

  • Hi Wayne,

    You can only use QMA in the direction count mode. And QEPB signal is used as the direction signal. For the direction count mode, QEPA input will provide the clock for the position counter and the QEPB input will have the direction information. The position counter will only increment on very rising edge of a QEPA input. So I do not believe you can use QEPB in the direction count mode with QMA to use as pulse counter.

    Best,

    Ryan Ma