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.

[参考译文] LP-MSP430FR2476:如何使用向上/向下计时器

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1348424/lp-msp430fr2476-how-to-use-up-down-timer

器件型号:LP-MSP430FR2476

使用示例程序"timer_a_ex6_upDownModeOperation"作为参考、如果我要使用 upDownMode 并以2秒的间隔闪烁 LED、我应该如何更改代码?
具体而言、如何为 upDownMode 启用中断?

此外、upDownMode 和连续模式之间是否存在差异?
如果有任何其他不同的模式、请告诉我。

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

    Ryota、您好!

    计时器增模式从0开始计数到 TAxCCRx 中的值、然后重复。 (第13.2.3.1节)

    计时器连续模式从0开始计数到0xFFFF、然后重复计数。 (第13.2.3.2节)

    定时器递增/递减模式从0递增计数至 TAxCCRx 中的值、然后递减计数至0、然后重复(第13.2.3.4节)

    对于中断、请使用如下所述的 CCIFG 和 TAIFG。