This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can Interrupt be Servied even when Micro controller hangs??

Hi Frnds,

Can a Interrupt Service Routine be serviced even when Micro controller hangs for undue reasons??

what is a hang in Microcontroller means????

Parents
  • "I am servicing watchdog timer in Interrupt"

    And now you know why that's a really bad idea!
    (but see below)

    The idea is that the Watchdog should be restarted if and only if the software is running correctly.

    Therefore, you should put your Watchdog restarts at a point in your code that is always reached when it's running properly, but won't be reached if anything hangs.

    Typically, this would be in your main loop.

    If you do have some operations that you know can take longer than the watchdog interval, you will have to either split them, or think of some solution.

    One way to extend the watchdog period does use an interrupt:
    Instead of restarting the watchdog directly, your main code restarts a global counter variable;
    The timer interrupt then decrements the variable, and only restarts the watchdog if it is above some limit...

    www.ganssle.com/watchdogs.pdf
    www.ganssle.com/.../tem105.pdf

Reply
  • "I am servicing watchdog timer in Interrupt"

    And now you know why that's a really bad idea!
    (but see below)

    The idea is that the Watchdog should be restarted if and only if the software is running correctly.

    Therefore, you should put your Watchdog restarts at a point in your code that is always reached when it's running properly, but won't be reached if anything hangs.

    Typically, this would be in your main loop.

    If you do have some operations that you know can take longer than the watchdog interval, you will have to either split them, or think of some solution.

    One way to extend the watchdog period does use an interrupt:
    Instead of restarting the watchdog directly, your main code restarts a global counter variable;
    The timer interrupt then decrements the variable, and only restarts the watchdog if it is above some limit...

    www.ganssle.com/watchdogs.pdf
    www.ganssle.com/.../tem105.pdf

Children