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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/11/07 08:58
Read: times


 
#136962 - datasheet
Responding to: ???'s previous message
Chen,

look into the datasheet, chapter Interrupt Priority Structure.
There are two different meanings of "priority" in '51:
- priority set in IP (and in this derivative also IPA) SFR (allowing interrupts with higher priority to interrupt a currently executed interrupt with lower priority)
- order of "polling", determining, which interrupt will be executed first if more interrupts are pending

the datasheet then said:
If two interrupts of different priority occur simultaneously, the high priority level request is serviced.
If requests of the same priority are received simultaneously, an internal polling sequence determines which request is serviced. Thus, within each priority level, there is a second priority structure determined by the polling sequence.


So, in your case, if you don't explicitly set either priority bit respective to UART0 and TIMER0 in IP, or set it for both, the timer interrupt will be executed first.

Btw., this is basic 8051 topic, covered also by the "bible".

Jan Waclawek


List of 10 messages in thread
TopicAuthorDate
two interrupts request at the same time            01/01/70 00:00      
   datasheet            01/01/70 00:00      
      right,but            01/01/70 00:00      
         error? what kind of error?            01/01/70 00:00      
            not reset,in debug PC don't change any more            01/01/70 00:00      
         Sounds like an atomicity problem            01/01/70 00:00      
         Maybe an event gets lost            01/01/70 00:00      
         initialization sequencing            01/01/70 00:00      
            a rare bug....            01/01/70 00:00      
         Interupts            01/01/70 00:00      

Back to Subject List