完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,我使用dspic33fj256mc710a,现在我尝试与看门狗一起工作,我设法使它工作非常简单,只是在空主()_FWDT(FWDTEN_ON&WDTPRE_PR32&WDTPOST_PS512)之前写下命令,然后每200us放置ClrWdt(),并且它的工作正常。像这样:_FWDT(FWDTEN_OFF&WDTPRE_PR32&WDTPOST_PS512);在空主服务器内的某个状态中打开它(),我试了两件事,但是它没有工作,比如:_FWDT=0x85;或者_FWDT=_FWDT|0xFF所以如果您知道怎么做,请告诉我……非常感谢:
以上来自于百度翻译 以下为原文 Hi all, Im using dspic33fj256mc710a and now I try to work with the watch dog , I manage to make it work very simple just wrote that command before void main() _FWDT(FWDTEN_ON & WDTPRE_PR32 & WDTPOST_PS512); and put the ClrWdt() every 200uS, and its work fine. Now I want to config the watchdog register like this : _FWDT(FWDTEN_OFF & WDTPRE_PR32 & WDTPOST_PS512); and turn it ON in some state inside the void main(), I tried couple of things and its didn't work, like: _FWDT = 0x85; or _FWDT = _FWDT | 0xFF So if you know what to do, let me know ... thank a lot :) |
|
相关推荐
2个回答
|
|
不能在运行时更改WD(和其他非易失性可配置)设置,因为它们只在复位时生效。大多数_Fxxx非易失性配置位在芯片的SFR中具有易失性副本,因此在文档中找到它们,并根据需要操纵外围设备。RTFM
以上来自于百度翻译 以下为原文 You can't change the WD (and other non-volatile configurable) settings in runtime because they come in effect only upon reset. Most of the _Fxxx non-volatile configuration bits have their volatile copies in the chip's SFRs, so find them in documentation and manipulate your peripherals as needed. RTFM. |
|
|
|
非常感谢,我找到了RCON寄存器,现在它正在工作:
以上来自于百度翻译 以下为原文 Thank you very much, I found the RCON register and now it's working :) |
|
|
|
只有小组成员才能发言,加入小组>>
4814 浏览 9 评论
1823 浏览 8 评论
1743 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
2949 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2055 浏览 5 评论
452浏览 1评论
1107浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
355浏览 0评论
260浏览 0评论
LAN9252使用SQI通信,进行数字复位后读BYTE_TEST异常
1777浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-20 07:49 , Processed in 1.134913 second(s), Total 71, Slave 61 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号