hello....
warm wishes of the day.i have 1 query.When our microcontroller gets hang ,is the interrupts are in working condition?If yes than what does hangs mean & if no than how watchdog timer works?help me out.
Thanks in advance
Solved! Go to Solution.
Hello,
When a microcontroller "hangs" it normally doesn't actually stop, it is still executing code, just not in a way that gets anything useful done. So when a interrupt occurs it still happens as normal but when it finishes execution returns right back to where it left off, back in the "hang" loop.
If the code it is executing in the hang condition includes a COP reset then the COP is not going to help at all.
Even if the COP does reset the processor it may simply end up back in the same place anyway.
Hello, I am not entirely sure about your query.
When an interrupt occurs that is associated with a hardware event, for example a timer interrupt, the ISR code that is executed is entirely independent of any other code. This code may still execute even if the code within the main loop is not executing correctly. This is why ISR code must never clear the watchdog timer.
Of course, if the ISR code itself should enter an endless loop, no other code will be able to execute, and the watchdog should timeout assuming it is enabled.
Regards,
Mac
hellooooooo bigmec,
r u der?Please explain me about my query...plz.
Hi....
GM....I beleive you have tried to explain my question but may be i not getting it.......can u please be little bit clearer......what does hangs means it our interrupts are working in hang condition? and how does watchdog works in hanging condition?
thanks..
Hello,
I can think of a few causes why the MCU might appear to "hang" - there may also be other causes. The following would be due to coding problems.
It is not the purpose of the COP (watchdog) timer to "fix" any of these problems - you must correct the coding errors.
Regards,
Mac
Dear my question is whether the interrupts works in hang condtion?if yes than how?
Hello,
When a microcontroller "hangs" it normally doesn't actually stop, it is still executing code, just not in a way that gets anything useful done. So when a interrupt occurs it still happens as normal but when it finishes execution returns right back to where it left off, back in the "hang" loop.
If the code it is executing in the hang condition includes a COP reset then the COP is not going to help at all.
Even if the COP does reset the processor it may simply end up back in the same place anyway.