I'm learning how to use interrupts in arduino. I've used them in Microchip applications and from what I've read there are some differences. Perhaps this is because the processor I am now using is more complex.
I am using an ATMega328P, trying to use Timer1 to capture the time of a pulse. I'm sure there is some arduino key function that will do what I want but I prefer to use the more native capabilities of the µP.
My question is:
I've read one should not enable or disable interrupts while in an isr() see: NickGammon, however in the past isr's were structured like:
turn off global isr's
save SREG
do what you have to
restore SREG
enable ISR's
Can someone tell me the reason for not enabling/disabling interrupt status in an interrupt in arduino?
Thanks
JohnRob