CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

WDT reset

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Suus



Joined: 11 May 2004
Posts: 8

View user's profile Send private message

WDT reset
PostPosted: Tue May 11, 2004 1:56 am     Reply with quote

Hello,

how can I check if there's been a watchdog reset?

Susan
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Tue May 11, 2004 2:10 am     Reply with quote

There is a function called restart_cause() that gives you the reason for reset. As for the values it returns, quoting from the manual: A value indicating the cause of the last processor reset.The actual values are device dependent. See the device .h file for specific values for a specific device. Some example values are: WDT_FROM_SLEEP, WDT_TIMEOUT, MCLR_FROM_SLEEP and NORMAL_POWER_UP.
RKnapp



Joined: 23 Feb 2004
Posts: 51

View user's profile Send private message

PostPosted: Fri May 14, 2004 9:51 pm     Reply with quote

Yes -- however, if you're using the debugger, it will always show that the restart cause is "normal power up." Not sure why... Just something to watch out for...

Smile Robert
MGP



Joined: 11 Sep 2003
Posts: 57

View user's profile Send private message

PostPosted: Mon May 17, 2004 1:48 pm     Reply with quote

RKnapp wrote:
Yes -- however, if you're using the debugger, it will always show that the restart cause is "normal power up." Not sure why... Just something to watch out for...

Smile Robert


Probably because the debugger drives the MCLR line to the target PIC low. That would look like a "normal power up" reset to the PIC and would be reflected in the target PIC status bits. That's just a guess on my part, but it seems logical.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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