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.

eQEP usage using HALCoGen Library

Other Parts Discussed in Thread: HALCOGEN

Application Description:

Motor Control of an Induction motor using a Scalar V/F scheme. The requirement to measure speed from 30 rpm to 2800 rpm with the 200/256 cpr ecoder/disc installed.

Problem and Issues

  1. For low speeds, the 16-bit QCPRD register I am reading overflows and thus I am reading erroneous values.
  2. I feel the descriptions for the functions defined in the eqep.h/eqep.c are insufficient. Clarification regarding their purpose would be appreciated.
  3. The example code in example_eqepEdgeCapture.c does not use the "standard" functions generated by HALCoGen (Code exerpt below). Is there a reason for that?
    /* Status flag is set to indicate that a new value is latched in the QCPRD register. */
    if((eqepREG1->QEPSTS & 0x80U) !=0U)
    {
    	/* Elapsed time between unit position events */
    	deltaT = eqepREG1->QCPRD;
    
    	/* Calculate Velocity from deltaT and the value of the unit position. */
    	/* The value of Unit Position is a sample value and should be changed by the User as per the actual value in the UNIT_POSITION_X macro above. */
    	velocity = (float)(UNIT_POSITION_X/deltaT);
    
    	/* Clear the Status flag. */
    	eqepREG1->QEPSTS |= 0x80U;
    }
    

  4. What would be the suggested/recommended settings for the EQEP module in HALCoGen for such an application.

Thanks
Safi