interupt return location

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

interupt return location

2,013件の閲覧回数
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
ラベル(1)
0 件の賞賛
4 返答(返信)

456件の閲覧回数
ernestsnaith
Contributor I
Ill have a think and get back if i have a problem, just looking for an easy fix.
 
cheers
0 件の賞賛

456件の閲覧回数
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 件の賞賛

456件の閲覧回数
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 件の賞賛

456件の閲覧回数
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 件の賞賛