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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Per Westermark
10/29/11 07:06
Read: 409 times
Sweden


 
#184424 - Incorrect use of ISR
Responding to: Michael Karas'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      Raj Nambiar      10/29/11 05:01      
   General ISR Design Principle        Michael Karas      10/29/11 06:14      
      Incorrect use of ISR      Per Westermark      10/29/11 07:06      
         the missed issue      Erik Malund      10/29/11 08:07      
      Delay Routines....      Michael Karas      10/29/11 09:34      
         Thanks a million...      Raj Nambiar      10/31/11 02:07      
            us, not ms      Per Westermark      10/31/11 04:27      
      try this - maybe      Marshall Brown      10/31/11 04:14      
         Thanks Brown..      Raj Nambiar      11/04/11 09:44      

Back to Subject List