MSP430F5418 的 RTC 中断问题
我正在使用 MSP430F5418 和 IAR EW 5.10。
在我的项目中,我使用 FreeRTOS 7.0 作为操作系统。
考虑这样的场景:
- 将 RTC 设置为闹钟模式,中断一分钟。
- 创建两个任务。
- 当一分钟中断到来时,任务 1 向任务 2 发送请求。
- 任务 2 用 4 条消息响应任务 1。
- 在接收消息时,任务 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:
- Setup RTC in alarm mode with one minute interrupt.
- Create two tasks.
- When one minute interrupt arrives, send a request to task 2 by task 1.
- Task 2 response to to task 1 with 4 messages.
- 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想说你有两个选择
我有一个基于 5418 的项目,该项目是从 F149 移植的,F149 没有硬件 RTC。作为移植过程的一部分,软件 RTC 的使用被硬件模块取代。使用了 TI 代码,但存在很多寄存器写入不正确的问题,因此重新安装了软件 RTC。
I would say that you have two options
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.