interupt return location

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

interupt return location

2,022 次查看
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 回复数

465 次查看
ernestsnaith
Contributor I
Ill have a think and get back if i have a problem, just looking for an easy fix.
 
cheers
0 项奖励

465 次查看
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 项奖励

465 次查看
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 项奖励

465 次查看
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 项奖励