完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好!我想让看门狗工作,但没用。我使用MPLAB X 3.10,和声1.10。在PIC32 MZ2048 EFM144I上运行的WDT是一致的,而我的语用条件是:{ PrimaMaq-MattFigs= PS1α-PrAPMA配置,WdtSPGM=STORMA PrimaMatg配置FWDTEN= OFI运行以下主要内容:WDTCONBITS.ON=1;而(1){}在第一行上有断点。断点只到达一次,我需要重置才能再次到达。所以我认为看门狗不起作用。我做错什么了?提前感谢!
以上来自于百度翻译 以下为原文 Hello, all! I'm trying to get the watchdog to work, to no avail. I'm using MPLAB X 3.10, hARMony 1.10. running on pic32mz2048efm144 I checked WDT in harmony, and my pragmas are: #pragma config WDTPS = PS1 #pragma config WDTSPGM = STOP #pragma config FWDTEN = OFF I run the following in main: WDTCONbits.ON = 1; while(1) { } with a breakpoint on the first line. the breakpoint is reached only once, and I need to reset to have it reached again. So I assume the watchdog does not work. What am I doing wrong? Thanks in advance! |
|
相关推荐
2个回答
|
|
谢谢!这解决了问题,但是,有没有办法阻止呢?我有能力做软件重置在调试模式,似乎合理的是能够做到这一点与看门狗。
以上来自于百度翻译 以下为原文 Thanks! That solved it. However, is there a way to prevent this? I'm capable of doing software resets in debug mode, seems reasonable to be able to do this with a watchdog.. |
|
|
|
在使用硬件调试器(如ICD3、RealICE、PICIT 3等)时,不能启用WDT。问题是,在调试模式下,该芯片实际上仍在运行。将停止看作是执行调试ISR(称为Debug执行程序)的中断。如果调试执行器不定期地监视看门狗,那么芯片将经历WDT溢出。如果调试执行程序清除了看门狗定时器,那么这将使WDT定时在用户代码中混乱。因此,Microchip坚持在调试芯片时关闭WDT。另一方面,模拟器没有这种限制。
以上来自于百度翻译 以下为原文 You can't enable WDT while using hardware debuggers such as ICD3, Real ICE, PICkit 3, etc. The issue is that the chip is actually still running while halted in debug mode. Think of halting as being an interrupt that executes a debugging ISR (called debug executive). If the debug executive doesn't pet the watchdog regularly then the chip would experience a WDT overflow. If the debug executive DOES clear the watchdog timer then this will mess up WDT timing back in the user's code. So Microchip insists that the WDT be turned off when debugging the chip. The simulator, on the other hand, doesn't have this limitation. |
|
|
|
只有小组成员才能发言,加入小组>>
5166 浏览 9 评论
2000 浏览 8 评论
1928 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3174 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2226 浏览 5 评论
734浏览 1评论
615浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
506浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
631浏览 0评论
528浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-24 21:48 , Processed in 1.736389 second(s), Total 84, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号