Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/26/01 21:16
Read: times


 
#9598 - RE: Software restart
Peter has given the right answer, albeit a little cryptic!
As soon as the 8052 starts executing an ISR as a result of an interrupt (the timer in your case), it sets secret, hidden, internal flipflops you cannot reset in any other way than by either executing a RETI instruction or doing a "proper" reset (hardware, watchdog, that sort of stuff).
The way you do it, Kory, jumping out of an interrupt service routine leaves the flipflop set. The 8052 will think it is still processing an interrupt, and will not execute other interrupts.
A good work around is to make your init code execute TWO RETI instructions. This will certainly reset that pesky interrupt mechanism for you.
I'm just typing away here, but this is the idea:

INIT:
.
.
ACALL DUMMY ;clear highest active interrupt level if any
ACALL DUMMY ;clear lower active interrupt level if any
.
etc...

DUMMY: RETI

Heed the other tips as well!

List of 7 messages in thread
TopicAuthorDate
Software restart            01/01/70 00:00      
RE: Software restart            01/01/70 00:00      
RE: Software restart            01/01/70 00:00      
RE: Software restart            01/01/70 00:00      
RE: Software restart            01/01/70 00:00      
RE: Software restart            01/01/70 00:00      
RE: Software restart            01/01/70 00:00      

Back to Subject List