Interrupt question!

What happens when an interrupt happens during an interrupt?

Since there are 2 interrupts...what if they both are triggered at the same time...or what happens if one is triggered while the other one is in process?

Are both Interrupt serviced?

What happens when an interrupt happens during an interrupt?

That depends upon interrupt priority and whether or not the first interrupt disabled further interrupts.

I am interested in what happens without disabling interrupts during an ISR routine.

I have been trying to use 2 interrupts triggering at up to 30kHz.

I thought that the interrupt handlers are executed with interrupts disabled. Upon exit of the interrupt, interrupts are then re-enabled.

If the same interrupt was to fire again during execution of the first interrupt handler - it would go unnoticed.

"Interrupts disabled" means interrupting disabled. AVR distinguishes synchronous and asynchronous interrupts (lookup the datasheet for which is which). Async interrupts will be queued, so they will fire immediately once interrupts are re enabled.

If you enable interrupts while interrupts are processed the interrupt handlers can be interrupted like any other program. If you require to much time for processing the interrupts this will overflow you stack.

Cheers, Udo