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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/06/04 01:46
Read: times


 
#82568 - Try This
Responding to: ???'s previous message
Sometimes it may be useful to duplicate the function so that there are two copies...one for mainline and one for interrupt.

You have to use great care in sharing subroutines between the mainline program flow and the interrupt thread. There are issues that must be considered including:

  1. Register bank usage

  2. Entry argument assignments to internal RAM by compiler

  3. Subroutine local variables allocation to internal RAM by compiler

  4. Subroutine re-entrancy when interrupt calls the routine while the same routine is being executed in the mainline



Many of these issues are discussed in knowledge base articles which you can search on the Keil web site.

Michael Karas


List of 19 messages in thread
TopicAuthorDate
89s52 function sharing.            01/01/70 00:00      
   Try This            01/01/70 00:00      
      emphasis            01/01/70 00:00      
         an idea...            01/01/70 00:00      
            Andy, I tried it            01/01/70 00:00      
               Jolly good!            01/01/70 00:00      
            Error            01/01/70 00:00      
               You need to work on it            01/01/70 00:00      
   reentrant ?            01/01/70 00:00      
      reentrant            01/01/70 00:00      
   non-reentrant            01/01/70 00:00      
   Wow            01/01/70 00:00      
   varaible sharing?            01/01/70 00:00      
      Variable sharing            01/01/70 00:00      
      Overflow            01/01/70 00:00      
      variables, main and ISR            01/01/70 00:00      
         Globals use more memory            01/01/70 00:00      
      Isn't that a global?            01/01/70 00:00      
         Globals, ISRs, main, & static            01/01/70 00:00      

Back to Subject List