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:eQEP 边沿捕捉模块的 QCLK

Guru**** 2481465 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1460259/tms320f28379d-qclk-of-eqep-edge-capture-module

器件型号:TMS320F28379D

工具与软件:

您好、专家们、

您能告诉我 QCLK 的实际值、它是单位位置事件频率时钟(MHz)

查看 driverlib 函数"eQEP_setCaptureConfig"说明:

//*****************************************************************************
//
//! 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.
//
//*****************************************************************************

在最后一行中、它说"例如、eQEP_UNIT_POS_EVNT_DIV_16将导致单位位置事件
QCLK/16的频率。"

但首先什么是 QCLK?

如果我按如下方式配置函数:

eQEP_setCaptureConfig (obj->qepHandle、eQEP_capture_CLK_DIV_128、eQEP_unit_POS_EVNT_DIV_32);

捕获计时器时钟将是 SYSCLKOUT/128、如果系统时钟是200 MHz、则这将是200/128 = 1.56 MHz。

但单位位置事件的频率是多少?

在 TRM 中我发现了这个,但它没有帮助计算 QCLK 的值。(除非它的意思是4 * 200 / 32 = 25 MHz ?)

亲切的帮助!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [报价 userid="521194" url="~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1460259/tms320f28379d-qclk-of-eqep-edge-capture-module "]

    但首先什么是 QCLK?

    [报价]

    QCLK 来自以下源。 可以来自正交解码器、也可以来自 eQEP 输入。

    [报价 userid="521194" url="~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1460259/tms320f28379d-qclk-of-eqep-edge-capture-module "]

    但单位位置事件的频率是多少?

    [报价]

    可以根据低速或高速测量预先调节单元位置事件。 如我们的 TRM 中所示。

    QCLK 例如、如果信号来自正交编码器、这实际上取决于您的正交设置。  

    但请注意、在下图中、QCLK 频率确实会根据 QA/QB 上发生的情况而变化。  

    因此、您的单元位置事件频率取决于 QCLK。 如果 QCLK 以恒定的1kHz 频率运行、以及您的 QCAPCTL。 UPs 被配置为 x1、然后 QCLK 和您的单元位置事件将对齐。

    此致!

    Ryan Ma