|
|
View previous topic :: View next topic |
Author |
Message |
DireSpume
Joined: 07 Jan 2013 Posts: 31
|
WDT doesn't work |
Posted: Wed Mar 13, 2013 5:52 pm |
|
|
Hello, I just wanted to post a problem that took me a while to figure out so that hopefully it will save the next person some time. I was trying to get the watchdog timer to work on a PIC18F67K22. I set the configuration bits as follows:
#fuses WDT,WDT1024
However, the PIC would never reset. Looking at the configuration bits, the WDT enable bit was cleared despite my clear intention to set it with the #fuse statement. Well, it turns out that the compiler ignores the WDT fuse if you also have this in your code:
#device ICD=TRUE
Remove that and the WDT works fine. I wasn't able to find a reference to this quirk anywhere. The weird thing is that the debugger seems to work fine even with that statement removed, so I don't even know what that does. Regardless, I wish the compiler would issue a warning when it ignores one thing because of another. It would have saved me a lot of time. (I'm such a whiner!). |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Mar 13, 2013 6:07 pm |
|
|
Quote: | I wasn't able to find a reference to this quirk anywhere
|
It's a recurring issue on the forum, in fact just yesterday it was discussed:
http://www.ccsinfo.com/forum/viewtopic.php?t=50053
Quote: | I wish the compiler would issue a warning
|
If you have current maintenance for the compiler, email CCS support
and ask that they issue a warning when any #fuses settings are changed
due to the DEBUG fuse being active, or #device ICD=TRUE being present.
If enough people request this, they might do it. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|