Hi I am wondering where the program counter goes when the program returns from interrupt service routine? I know when the interrupt event occurs the PC is pushed into the st
Exact behaviour of interrupts are hardware-specific, but the CPU will simply wait until first_instruction is finished. After that, it will push CPU state onto stack (or save it in other way) and start ISR. That means that your ISR will not be executed immediately - there is a tiny delay, which may become an issue in hard realtime applications.