We have all heard: "Interrupt Service Routines (ISR) should be as short as possible." Why? I don't honestly know why?
I think it's because all other interrupts are blocked until that ISR completes. Does this mean that interrupts are enabled when the ISR goes out of scope? Does it make any difference if the current ISR is the only ISR in the project? How do I know when the code in the ISR is too long? How does it manifest itself when the ISR is too long, especially when it's the only interrupt?
This isn't a pure academic question. In my current project, one ISR is almost 2 pages of source code and I want to discuss it with the author, but I can't find an objective way to tell him why its too long other than saying it looks too long. (The project has other interrupts.) I think that the ISR is a blocking routine is a "good enough" explanation, but if some knows a better way to explain it, I'm all ears.
Thanks!
I think it's because all other interrupts are blocked until that ISR completes. Does this mean that interrupts are enabled when the ISR goes out of scope? Does it make any difference if the current ISR is the only ISR in the project? How do I know when the code in the ISR is too long? How does it manifest itself when the ISR is too long, especially when it's the only interrupt?
This isn't a pure academic question. In my current project, one ISR is almost 2 pages of source code and I want to discuss it with the author, but I can't find an objective way to tell him why its too long other than saying it looks too long. (The project has other interrupts.) I think that the ISR is a blocking routine is a "good enough" explanation, but if some knows a better way to explain it, I'm all ears.
Thanks!