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.

[参考译文] Linux/AM3352:ECAP 最低 PWM 频率

Guru**** 2589280 points
Other Parts Discussed in Thread: AM3352

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/640223/linux-am3352-ecap-minimum-pwm-frequency

器件型号:AM3352

工具/软件:Linux

大家好、

     我们已经使用 AM3352制作了定制板。 我们需要从 PWM 模块生成50Hz 时钟。 我们将 ECAP0_IN_PWM0_OUT 用作 PWM。 我们可以实现25%、50%和75%的占空比生成。 但通过以下链接、支持的最小频率范围为1.5KHz。

https://e2e.ti.com/support/arm/sitara_arm/f/791/p/557045/2040522

如何使用  ECAP0_IN_PWM0_OUT 生成50Hz 频率。

此致、

Avinash N

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

    PWMSS 功能时钟为100MHz、用于定义 PWM 周期的 CAP3 (APRD)寄存器为32位。 值2000000十进制应提供50Hz 周期。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!

    我们已进行上述配置。 但我们仍然无法实现50Hz。
    寄存器中填充的值为、

    #Enable 块
    MD.L 0x44E000D4 1.
    mw.l 0x44E000D4 0x2


    #Configure C18 as eCAP0_IN_PWM0_OUT
    MD.L 0x44E10964 1.
    mw.l 0x44E10964 0x00

    #Enable ePWM0 clk
    MD.w 0x44E10664 1.
    MW.w 0x44E10664 0x1

    #Check 时钟状态(PWMS_CLKCONFIG_REG = 0x101?)
    MD.w 0x4830000C 1.

    #Configure ECCTL2
    MD.w 0x4830012A 1.
    MW.w 0x4830012A 0x0280

    写入 CAP1-3
    mw.l 0x48300108 2000000
    mw.l 0x48300110 2000000

    写入 CAP2-4
    mw.l 0x4830010C 0x5F5
    mw.l 0x48300114 0x5F5

    #Configure CTRPHS
    MD.L 0x48300104 1.
    mw.l 0x48300104 0x0

    #将 ECCTRL 设置为运行
    MD.w 0x4830012A 1.
    MW.w 048300012A 0x0290


    必须在上述寄存器访问中进行任何修改。

    此致、
    Avinash N
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您是否在器件引脚上看到任何输出?