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.

[参考译文] MSPM0G3507:计时器比较模式

Guru**** 2627105 points

Other Parts Discussed in Thread: MSPM0G3507, SYSCONFIG

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1350779/mspm0g3507-timer-compare-mode

器件型号:MSPM0G3507
主题中讨论的其他器件: SysConfig

大家好、

我想在比较模式下尝试计时器、而不使用任何外部中断输出。 例如、我想将两个不同的值加载到 计时器中、并需要在计时器计数达到所需值时进入中断例程。

如果可以提供一些示例、那将非常有用。

此致

斯坦尼斯卢斯

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

    您好、 

    基于 SDK 演示代码: timx_timer_mode_pwm_edge_sleep_lp_MSPM0G3507_nortos_ticlang

    您可以启用两个 通道 x 捕获或比较递增/递减事件 中断。

    然后使用此代码来禁用计时器的 PWM 输出。 该值取决于您使用的 PWM 通道。

    PULSE_PWM_INST->COMMONREGS.ODIS = 0x03;

    此外、您可以重置 由 SysConfig 初始化的 GPIO (两个 PWM 输出引脚)。

    ----------------

    或者、您可以参考以下工具进行的配置来手动配置计时器: timx_timer_mode_pwm_edge_sleep_lp_MSPM0G3507_nortos_ticlang

    此致、

    赫利克