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

How do software reset

I want to reset the software inside the interrupt service routine.

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

while am using this code only one time executing the code second time it blocking the interrupt..

pls help me

Parents
  • you 'can' do a software reset, BUT it is not THAT easy. Just jumping to zero does not do it. All SFRS have 'startup values' you need to restore all those before jumping to zero. Also, if you try it from inside an ISR it gets even more complicated since you need to restore some registers not 'publically available'

    Thus

    FORGET ABOUT A SOFTWARE RESET, just let the watchdog time out.

    Erik

Reply
  • you 'can' do a software reset, BUT it is not THAT easy. Just jumping to zero does not do it. All SFRS have 'startup values' you need to restore all those before jumping to zero. Also, if you try it from inside an ISR it gets even more complicated since you need to restore some registers not 'publically available'

    Thus

    FORGET ABOUT A SOFTWARE RESET, just let the watchdog time out.

    Erik

Children