In my code, control is jumping from an interrupt service routine to some X function. After executing that X function, it's doing reset because it doesn't know to where it should return. Can you please tell me the what registers I need to take care of when jumping from interrupt service routine to function X ?
Scenario:
Function m() {
Function x();
}
Function x() {
Step1:
Step2:call Function Y();
Step3:
}
Function y() {
Step1:Enable interrupt;
Step2:call function z();
step3:disable interrupt;
}
interrupt() {
Step1:Jump Step 3 of function x();
}
Explanation: Function Z should execute within some time duration so I'm using a timer interrupt to achieve that timeout. I'm giving step 3 of function x() address in interrupt service routine so that control will come back after particular time duration (jumping is achieved by changing the PC address).
Hardware: NEC V850E2 processor, GHS compiler. Software: Embedded C.