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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/02/09 08:35
Read: times


 
#161254 - LJMP 0 is not a Reset
Responding to: ???'s previous message
Hello

The 8051 controller does not reset the internal interrupt level state, if the program is restarted with a LJMP 0.

So, if a LJMP 0 is done from inside a interrupt function, of a nested interrupt function, the problem you describe will show.

You can (just as an example) add to your startup code following code:


LabelA:
    SJMP  LabelC
LabelB:
    RETI
LabelC:    
    MOV   R0, #4      ; The maximum nested interrupt level possible
    LCALL LabelB      ; Execute a RETI 
    DJNZ  R0, LabelC

 


This hint does not mean, that a real reset wouldn't be better; but this was not your question.

Best regards
Juergen



List of 5 messages in thread
TopicAuthorDate
Returning from the timer without using RETI            01/01/70 00:00      
   LJMP 0 is not a Reset            01/01/70 00:00      
      Correction            01/01/70 00:00      
         Problem solved            01/01/70 00:00      
   any means of exit from an ISR ...            01/01/70 00:00      

Back to Subject List