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.

[参考译文] MSP430FR2433:使用计时器在 MSP 固件中添加延迟

Guru**** 2557520 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/894998/msp430fr2433-adding-delay-in-msp-firmware-using-timer

器件型号:MSP430FR2433
主题中讨论的其他器件:MSP430WARE

您好!

为了实现延迟、我需要在 MSP430中配置3个单独的计时器。

我需要得到以下延迟:

  1. 250毫秒
  2. 10秒
  3. 90秒

请分享我可以参考的示例代码。

此外、我还有以下要求:

  1. 定时器应该使用 ACLK
  2. 它应该以向上计数模式运行

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

    您好!

    您可以使用一个由 ACLK 供源的计时器模块、该模块会执行全部三个延迟。 对于250ms 周期、您不需要像10秒和90秒周期那样的软件计数器。 如果您使用的是 CCS、则可以在 TI Resource Explorer 中找到使用向上计数模式和 ACLK 的计时器代码示例。 您可能需要下载并安装 MSP430Ware。 也可以在 dev.ti.com/tirex 上找到适用于您的器件的代码示例。

    另一种选择是使用 RTC 模块、如以下技术手册中所述。

    使用 MSP430TmMCU 的基于 RTC 的简单系统唤醒控制器

    使用实时时钟库

    这些资源应该足以帮助您快速入门。

    此致、

    James