Re: hc12,can i return from interrupt and jump elsewhere?
- From: Anton Erasmus <nobody@xxxxxxxxxxxxxxxx>
- Date: Sat, 29 Sep 2007 15:18:07 +0200
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.
Regards
Anton Erasmus
.
- Follow-Ups:
- Re: hc12,can i return from interrupt and jump elsewhere?
- From: Robert Adsett
- Re: hc12,can i return from interrupt and jump elsewhere?
- References:
- hc12,can i return from interrupt and jump elsewhere?
- From: blisca
- hc12,can i return from interrupt and jump elsewhere?
- Prev by Date: Re: PCB production: China or Taiwan?
- Next by Date: Re: Synchronized SPI communication
- Previous by thread: hc12,can i return from interrupt and jump elsewhere?
- Next by thread: Re: hc12,can i return from interrupt and jump elsewhere?
- Index(es):
Relevant Pages
|