Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Context switching is the process of saving the current state of the process/processor when the interrupt is trigger and the interrupt service routine (ISR) is executed.
What exactly the current state involves, e.g., data, variables, etc. which maybe altered during ISR execution, typically varies from microcontroller architecture, specific compiler and issued compiler directives. The context state is often, but not always, pushed on the stack and after ISR execution restored, hence restoring the process/processor to a state before the interrupt occured and ISR was executed. The code execution flow then returns to the original process at the point when the interrupt occurred.