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

don't want the WATCHDOG to reset, but it does!
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
neil



Joined: 08 Sep 2003
Posts: 128

View user's profile Send private message

Never mind!
PostPosted: Fri Oct 21, 2005 8:57 am     Reply with quote

Sorry Embarassed I realise I have just asked a question hundreds have asked before! I will search and think before I ask again!!
Storic



Joined: 03 Dec 2005
Posts: 182
Location: Australia SA

View user's profile Send private message Send e-mail

PostPosted: Sun Feb 19, 2006 5:16 pm     Reply with quote

Here is a code I use for the WDT
Code:
#int_RTCC
RTCC_isr()
{
  if (++CPUled > 240) {  // Increment value of cnt on every interrupt
      output_toggle(CPU_led);
      CPUled = 0;
      // restart_wdt(); // original location for WDT int fault
      }
      restart_wdt(); // new location
}


I reset my WDT in timer 0 interrupt with my CPU led, I use to reset with the CPU led toggle however I had intermitent WDT reset, for some reason after the led toggle it would not reset the WDT. It did not happen all the time, it was only with some boards, same program and same board layout. I now reset every Timer 0 interupt, not every CPU led toggle (240 T0int)

ANdrew
_________________
What has been learnt if you make the same mistake? Wink
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
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