interupt return location

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

interupt return location

2,004 Views
ernestsnaith
Contributor I
How can i specify where i want an interrupt to return to when it has been dealt with? I do not want it to return to a calculation it is half way through with old data.
 
Thanks
 
MC9S12XDT512  and CW
Labels (1)
0 Kudos
4 Replies

447 Views
ernestsnaith
Contributor I
Ill have a think and get back if i have a problem, just looking for an easy fix.
 
cheers
0 Kudos

447 Views
Steve
NXP Employee
NXP Employee
Have a think about using XGATE for the interrupt if this is an issue for you. That way you may be able to avoid the problem all together!
0 Kudos

447 Views
Red
Contributor I
As J2ME said, you could manipulate the return address that is stored on the stack in order to change the return location.  I have done this before, although only ever in experimental software.  I'm not sure I'd use the same approach for anything serious.
You probably should think of alternatives and consider any side effects of this as it does deviate from what the hardware is designed to do.
 
0 Kudos

447 Views
J2MEJediMaster
Specialist I
Simpliest answer is that you can't. The hardware is designed so that the program resumes precisely where it left off. You could probably tinker with the stack to change the return address, but before going to that extreme, you'd probably be better off redesigning the application rather than thwart man-years of hardware design.

What exactly are you trying to do that requires such a drastic measure?

---Tom
0 Kudos