Hank, -how to say this, hmmmm.....
There are a few things in life one CAN do, but shouldn't. we CAN bungie jump, we CAN take a motorcycle above 160mph on city streets, and we CAN jump out of an interrupt.
If you know what is happening in the uP's world, you can re-direct the program to wherever you want. But some things to be aware of:
an ISR is just a subroutine that gets executed under a "special" gosub if you will. As such, you can gosub to a routine and never return.
When an ISR is called, things get saved to the stack. this is where the combustion MAY occur. If you don't return from the ISR, the stack gets corrupted. I am not sure how this will affect the continued running of your main. I am sure there is a way to "POP" the stack to remove what should get taken away with the return. I am NOT sure if this is needed.
I am pretty sure DT_INT may get even more mad then a low level interrupt call as there is lots of stuff going on there to make sure the ISR can be entered and exited without issue.
I am sure there may be more things to keep track of, but these are the first things that come to mind.
But the most fun thing to do is try it out. write some code to turn on some led's using subroutines. turn on another from the ISR, and yet another from the ISR jump to location. If everything goes as expected, you can prolly assume a 75% chance of success. The other 25% is for things I don't know.
Hopefully Darrel will come on in and clear up the rest.
Bookmarks