PeterH:
kenny_devon:
In fact you can see that it is the very act of inhibiting further interrupts that is making the writing of ISRs seem difficult - by keeping interrupts enabled, most of the problems evaporate.I'm curious to know what this opinion is based on. Have you done any interrupt-based programming? It's not obvious from your post.
I agree. One might ask why the Atmel AVR folks designed the hardware to automatically disable interrupts upon first entering a ISR routine as the default behavior, if it was almost always the best practice to do otherwise? Certainly one can re-enable interrupts while inside a ISR to allow nested ISRs to function but I would think that would be a very edge case at best, where that is indeed the best method to handle a specific requirement?
Lefty