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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/13/10 05:59
Modified:
  08/13/10 06:03

Read: times


 
#177973 - Use RegSet 1 for Interrupts
Responding to: ???'s previous message
I wholly agree with Erik. Use Register set 1 for all your interrupts. Let all the mainline code use the default register set 0.

Also make sure that if you do create any subroutines to call from the interrupts that you set all of those up to use register set 1 as well. Then make for sure that these subroutines are ONLY called from the interrupt context.

Lastly you need to go through the library code for the TCP/IP stack that you mentioned and make sure that it does not every mess around with the bits that set the register bank selection. If it does mess with these bits make good and sure that it does so in a safe way that allows restore to the previous settings of the bits.

I bring up this last item above because I once had a project where the sprintf() library routine was messing around with some bits I wanted to use and it was not restoring them back properly. It was a huge pain. You can read all about it here: http://www.8052.com/forum/read/50530

Michael Karas




List of 7 messages in thread
TopicAuthorDate
IIC tramples UART0 routine            01/01/70 00:00      
   no need for multiple banks            01/01/70 00:00      
      Possibilities            01/01/70 00:00      
      Use RegSet 1 for Interrupts            01/01/70 00:00      
         Public Apology            01/01/70 00:00      
            "Everything appeared to work (sic) for some time"            01/01/70 00:00      
               Indeed!            01/01/70 00:00      

Back to Subject List