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: QCLK of eQEP edge capture module

Part Number: TMS320F28379D

Tool/software:

Hello experts ,

Can you please tell me the actual value of QCLK which is the Unit position event frequency clock in (MHz)

Looking into the driverlib function "EQEP_setCaptureConfig" description:

//*****************************************************************************
//
//! Configures eQEP module edge-capture unit.
//!
//! \param base is the base address of the eQEP module.
//! \param capPrescale is the prescaler setting of the eQEP capture timer clk.
//! \param evntPrescale is the prescaler setting of the unit position event
//! frequency.
//!
//! This function configures the operation of the eQEP module edge-capture
//! unit.  The \e capPrescale parameter provides the configuration of the eQEP
//! capture timer clock rate. It determines by which power of 2 between 1 and
//! 128 inclusive SYSCLKOUT is divided. The macros for this parameter are in
//! the format of EQEP_CAPTURE_CLK_DIV_X, where X is the divide value. For
//! example, \b EQEP_CAPTURE_CLK_DIV_32 will give a capture timer clock
//! frequency that is SYSCLKOUT/32.
//!
//! The \e evntPrescale parameter determines how frequently a unit position
//! event occurs. The macro that can be passed this parameter is in the format
//! EQEP_UNIT_POS_EVNT_DIV_X, where X is the number of quadrature clock
//! periods between unit position events. For example,
//! \b EQEP_UNIT_POS_EVNT_DIV_16 will result in a unit position event
//! frequency of QCLK/16.
//!
//! \return None.
//
//*****************************************************************************

In the last line it says "For example, EQEP_UNIT_POS_EVNT_DIV_16 will result in a unit position event
frequency of QCLK/16."

But what is QCLK in the first place?

If i configure the function like this:

EQEP_setCaptureConfig(obj->qepHandle, EQEP_CAPTURE_CLK_DIV_128, EQEP_UNIT_POS_EVNT_DIV_32);

The capture timer clock will be SYSCLKOUT/128, if the system clock is 200 MHz, then this would be 200/128 = 1.56 MHz.

But what would the Unit position event frequency be?

Looking into the TRM i found this , but it dosn't help be calculate the value of QCLK.(unless it means 4 * 200 / 32 = 25 MHz?)

Kindly help!

  • But what is QCLK in the first place?

    QCLK comes from the following source. can be from the quadrature decoder or from the eQEP inputs.

    But what would the Unit position event frequency be?

    The unit position event can be pre scaled depending on low or high speed measurements. As shown in our TRM.

    QCLK if it's coming from the quadrature encoder for example then it's really dependent on your quadrature settings. 

    However note, in the below image, QCLK frequency does change depending on what's occurring on QA / QB. 

    Therefore your unit position event frequency is dependent on QCLK. If QCLK is running at constant 1kHz, and if you  QCAPCTL.UPPS was configured to be x1, then QCLK and your unit position events will align.

    Best,

    Ryan Ma