打印
[ZLG-ARM]

LPC21XX WDT 问题注意事项!

[复制链接]
1684|4
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
TRUE_ARM|  楼主 | 2010-1-6 10:28 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
虽然使用LCP21XX 很长时间,但一直没有使用内部看门狗,这次我看门狗打开了,却发现经常导致复位,经过调试,锁定是内部看门狗搞鬼,反复测试发现是因为在喂狗的两条语句,如下:
     WDFEED = 0xAA;                    
     WDFEED = 0x55;
受到到中断影响,导致两条语句执行的时间增长,内部认为FEEDWDT 错误。

下面是DATASHEET中的描述:
4.3 Watchdog Feed register (WDFEED - 0xE000 0008)
Writing 0xAA followed by 0x55 to this register will reload the watchdog timer to the WDTC
value. This operation will also start the watchdog if it is enabled via the WDMOD register.
Setting the WDEN bit in the WDMOD register is not sufficient to enable the watchdog. A
valid feed sequence must first be completed before the Watchdog is capable of
generating an interrupt/reset. Until then, the watchdog will ignore feed errors. Once 0xAA
is written to the WDFEED register the next operation in the Watchdog register space
should be a WRITE (0x55) to the WDFFED register otherwise the watchdog is triggered.
The interrupt/reset will be generated during the second PCLK following an incorrect
access to a watchdog timer register during a feed sequence.

应该提示 write 0xaa & write 0x55 之间的最短的时间要求,这样的使用者更清晰、更容易的使用这个东东。

相关帖子

沙发
loveforever| | 2010-1-6 19:03 | 只看该作者
学习了,
经验。

使用特权

评论回复
板凳
五谷道场| | 2010-1-6 19:03 | 只看该作者
英语不好,看半天

使用特权

评论回复
地板
lobby| | 2010-1-6 19:28 | 只看该作者
厂家那么写还是有它的道理的,
我觉得还可以接受,
呵呵。

使用特权

评论回复
5
6019赵文| | 2010-1-6 23:15 | 只看该作者
学习了

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

124

主题

454

帖子

1

粉丝