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.

[参考译文] CCS:更新了 TAxCCRn 值共源共栅 LED 调光的值

Guru**** 2562120 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/604163/ccs-update-value-of-taxccrn-value-casuse-led-diming

工具/软件:Code Composer Studio

我将 fr2533的 TA0用于 PWM 输出  

我的配置描述如下:

1 μ s PWM、时间 为 10ms

2、PWM 的占空比从10%变为90% 、升压/降压为5%

3、每个占空比持续50ms

由于数据表中说明了当更改 TARxCCRn 值,计时器必须停止,这将使 PWM 输出同时停止,这将导致 LED 调光

  是否有任何其他方法可以  在不使用停止计时器的情况下更改 PWM 占空比?

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

    您必须停止计时器以避免意外行为;但是、只要器件的 MCLK 运行速度足够快、器件就有足够的时间停止计时器、更改值、并在 LED 不调光的情况下重新启动计时器。 4MHz 或更高频率应足够快、以实现这一目标。

    此致、
    Matthew