Re: hc12,can i return from interrupt and jump elsewhere?



In article <ssjsf35v96rt6b6shoti00qm6oo4issd5t@xxxxxxx>, Anton Erasmus
says...
On Sat, 29 Sep 2007 14:55:09 +0200, "blisca"
<bliscachiocciolinatiscali.it> wrote:

Hello from Milan ,Italy,
i'm programming a 9s12 uC in C language,with occasional assembly inserts;

the question is:

a function myfunc() is runnin,and an external events calls an interrupt
service routine,is it possible,once the interrupt did its job,to avoid to
continue with my func()
from the point where it was interruptd,and going back to main() instead?It
is not important if i have to run another couple of line in
myfunc().Important is that i can go out from it soon;

Can anyone suggest me the most elegant way?
Once more forgive my English.

If all you want is to restart your code, i.e. re-enter main from the
start, then you can use a watchdog reset. Just stop toggleing your
watchdog when you get your event. The watchdog will trigger, and
restart your micro. If you want to resume a sepcific function on
reception of an interrupt event, then this is less trivial. Unless you
want to write your own RTOS, the simplest is to use either one of the
many open source ones, or a commercial one.
http://www.freertos.org/ seem to have a port for your micro.

And if he is simple seeking to abort an operation setting a flag in the
interrupt routine and checking it in the routine you are interrupting is
fairly straightforward.

It seems an odd requirement. To the original poster, what is the effect
you are trying to achieve? Tell us what you are trying to do rather
than how you are proposing to do it. We might be able to suggest better
approaches.

Robert

--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • Re: hc12,can i return from interrupt and jump elsewhere?
    ... a function myfunc() is runnin,and an external events calls an interrupt ... service routine,is it possible,once the interrupt did its job,to avoid to ... then you can use a watchdog reset. ... http://www.freertos.org/ seem to have a port for your micro. ...
    (comp.arch.embedded)
  • hc12,can i return from interrupt and jump elsewhere?
    ... i'm programming a 9s12 uC in C language,with occasional assembly inserts; ... a function myfunc() is runnin,and an external events calls an interrupt ... service routine,is it possible,once the interrupt did its job,to avoid to ...
    (comp.arch.embedded)
  • Re: MT8888 with 89c51
    ... There Is An Interrupt Routine In 8051 That Works In 2 Way.When ... Call Progeress Or DTMF Code Has Recieved This Routine Was Invoked.When ... Available In The Circuit Turn On And After A Pause It Turn Off Via The ...
    (comp.arch.embedded)
  • Re: AT91SAM7X256 watchdog interrupt
    ... WDFIEN: Watchdog Fault Interrupt Enable ... A Watchdog fault has no effect on interrupt. ... WDRSTEN: Watchdog Reset Enable ...
    (comp.arch.embedded)
  • Re: AT91SAM7X256 watchdog interrupt
    ... watchdog, in order to set the correct handle for the interrupt. ... A Watchdog fault has no effect on interrupt. ... WDRSTEN: Watchdog Reset Enable ...
    (comp.arch.embedded)