> Subject : WD problem > From : N Agavriloaie > >[...] >This function is called from main program for WD refreshing. >However after a period of time microcomputer is lock >and WD does not work. > >I think that the program loop in which processor jump when is >locked includes WD refresh function. > >What is the solution for this problem? Answer from: Arvind Patel elvpo@ad1.vsnl.net.in Your doubt may be right. Go with following steps. Most probebly you will find solution. 1. First tryout disabling all interupt and run only main loop program and see the watch dog functioning. 2. Check for WATCHDOG function enebled. In some of microcontroller ther is a input pin to disable or enable WD function. 3. Your power supply may be causing problem. Tryout early reset circuit. This will also help in power surge hangup. Watch dog is not effective in such conditions. The reason is in a surge condition power goes down and resore immediatly resulting in small discharge of reset capacitor. This small discharge prevents the CPU from proper reset cycle and starts executing the code from a random point. This may continue to trigger watch dog and voids watch dog reset but your program may not be functioning properly. 4. Your code may be wrong. Check for STACK overflow in a certain instance. If you are using re-entrent function than avoid them. 5. Add a code to toggle a portpin along with your watch dog code so that you can assure that your code is calling WD routine from somewhere. From : Gerhard Fiedler You might try to take out as many of your wd resets as possible without getting it reset. Maybe you remove just the one which causes your problem... And you may try to find out where the processor loops. How you do that depends on the rest of the system and your development tools.