MSP430F5418 的 RTC 中断问题

发布于 2024-12-26 07:04:30 字数 397 浏览 6 评论 0原文

我正在使用 MSP430F5418 和 IAR EW 5.10。

在我的项目中,我使用 FreeRTOS 7.0 作为操作系统。

考虑这样的场景:

  1. 将 RTC 设置为闹钟模式,中断一分钟。
  2. 创建两个任务。
  3. 当一分钟中断到来时,任务 1 向任务 2 发送请求。
  4. 任务 2 用 4 条消息响应任务 1。
  5. 在接收消息时,任务 1 调用一个循环 0x7FFF 次的简单函数。

这里,在第四次请求之后,即使没有经过一分钟,也会立即生成RTC中断。

我正在使用 TI 提供的解决方法代码来进行 RTC 操作。

谁能告诉我为什么会发生这种意外行为???

谢谢你,

哈里

I am using MSP430F5418 wit IAR EW 5.10.

In my project I am using FreeRTOS 7.0 as operating system.

Consider the scenerio:

  1. Setup RTC in alarm mode with one minute interrupt.
  2. Create two tasks.
  3. When one minute interrupt arrives, send a request to task 2 by task 1.
  4. Task 2 response to to task 1 with 4 messages.
  5. While receiving messages task 1 calls a simple function which loops for 0x7FFF times.

Here, after the 4th request, an RTC interrupt is generated immediatly even if one minute is not passed.

I am using the Work-around code provided by TI for RTC manipulation.

Can anybody please tell me why this unexpected behaviour happens???

Thank you,

Hari

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绝不服输 2025-01-02 07:04:30

我想说你有两个选择

  1. 使用较新的 F5418A,它已修复 RTC 问题。
  2. 不要使用 RTC

我有一个基于 5418 的项目,该项目是从 F149 移植的,F149 没有硬件 RTC。作为移植过程的一部分,软件 RTC 的使用被硬件模块取代。使用了 TI 代码,但存在很多寄存器写入不正确的问题,因此重新安装了软件 RTC。

I would say that you have two options

  1. Use the newer F5418A which has the RTC problems fixed.
  2. Don't use the RTC

I have a project based on the 5418 that was ported from an F149, which does not have a hardware RTC. As part of the porting process use of the software RTC was replaced with the hardware module. The TI code was used but there were so many problems with the registers not writing properly that the software RTC was put back in.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文