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
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
Maybe this is not what you meant, but to get the C8051F3xx parts to reset, I've done this:
void Timer3_ISR(void) interrupt 14 {
//using as Watch-Dog Timer //32msec time-out RSTSRC |= 0x10; }
This isn't a true WDT, but the C8051F3xx parts don't have a real one anyways.
"RSTSRC |= 0x10" will cause the part to reset.
This isn't a true WDT, but the C8051F3xx parts don't have a real one anyways. this "watchdog" is known as "the Intel Kludge". when SILabs decided not to make derivatives any more, but decided to make deviates instead, among the many silly/stupid things they did was to drop the REAL watchdog the derivatives have.
I tried making PSW=0; unsinged char addr=SP; addr-1=0; addr-2=0;........addr-7=0;
but this codes also not working ..
second time it blocking the timer interrupt...
plz help me..
i tired like dat also plz
second time its blocking the isr ..
there is ay options are thr for reseting with out using WDT
you don't need to do anything. if your watchdog is serviced by this call:
service_my_watchdog()
, all you have to do is avoid calling it. I don't know the C51, but an ARM allows a post reset analysis in order to determine the reason for a reset. that could be handy for you, too. is your watchdog even running?
I don't know the C51, but an ARM allows a post reset analysis in order to determine the reason for a reset. most modern '51 derivatives have that feature (if using internal dog, of course).