Will Serial.Print Execute After Interrupt?

This topic says serial.print will not execute during an interrupt.

Gammon Forum : Electronics : Microprocessors : Interrupts

If i put a serial.print inside the interrupt routine, will it get queued, and then execute, when the interrupt is finished?


The danger is that your serial.print inside the ISR will fill the outgoing buffer. Then, the print code will block waiting for space to become available in the buffer. But, that will never happen because the buffer is emptied by an ISR services UART interrupts. Those interrupts will never happen because your serial.print has blocked execution with interrupts disabled.

Don't know. Don't do it. As it says in the tutorial interrupts should be quick. Set a flag in the interrupt code then check the flag outside the interrupt and do the print. Don't forget to clear the flag.

Why do you want to do it?