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

Software Reset

I can generate a software reset by the following code:

((void (code *) (void)) 0x0000) ();

After the reset, however, my application no longer responds to my interrupts. How can I reinizialize all my interrupts in C?

Any help would be appreciated.

Thanks.

Parents
  • My guess is that you are making that call from within an interrupt service routine so the interrupt hardware is never being reset by a RETI.

    Excellent guess. I do belive even the right one.

    To recover the interrupt status, you must pad the stack and execute a reti. Somethimes you need to do it more than once. One derivative, I do not recall which, lock up if you do too many, but most can handle you doing it for, say, 3 times without locking up.

    Use the watchdog, it WORKS ALWAYS.

    Erik

Reply
  • My guess is that you are making that call from within an interrupt service routine so the interrupt hardware is never being reset by a RETI.

    Excellent guess. I do belive even the right one.

    To recover the interrupt status, you must pad the stack and execute a reti. Somethimes you need to do it more than once. One derivative, I do not recall which, lock up if you do too many, but most can handle you doing it for, say, 3 times without locking up.

    Use the watchdog, it WORKS ALWAYS.

    Erik

Children