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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/29/11 13:06
Read: times


 
#184424 - Incorrect use of ISR
Responding to: ???'s previous message
No, one or three functions does not change the likelyhood of reentrancy issues. The probability is not caused by the number of functions, but the amount of time you spend in the function (i.e. how large chance the other ISR has to be activated while the first ISR is waiting in the delay function).

But an ISR is something you use for quick responses. So ISR are not really compatible with delay loops. If you can afford to use delay loops in the ISR, then you don't need the ISR. Just poll your timers and other peripherials from your main loop instead.

An ISR should enter quickly (that happens automatically by the hardware if you just avoid to turn off interrupts). But it should also finish the task quickly and leave, so it is ready for next interrupt event. And one ISR should try to affect other ISR as little as possible.

SO in the end - your software design is way broken. Rewrite the code properly, instead of trying different workarounds.

List of 9 messages in thread
TopicAuthorDate
Multiple calls to segment            01/01/70 00:00      
   General ISR Design Principle            01/01/70 00:00      
      Incorrect use of ISR            01/01/70 00:00      
         the missed issue            01/01/70 00:00      
      Delay Routines....            01/01/70 00:00      
         Thanks a million...            01/01/70 00:00      
            us, not ms            01/01/70 00:00      
      try this - maybe            01/01/70 00:00      
         Thanks Brown..            01/01/70 00:00      

Back to Subject List