2016-05-30 12:08 PM
Hi,
how can i do to jump (with gcc inline assembly on cortex M3/M4) to main after an interrupt. I don't want to use flag in my case.
void
my_interrupt(
void
)
{
__asm__ __volatile__ (
''instruction1 to jump to main''
''instruction2 to go to main''
)
}
int
main(
void
)
{
my_code();
...
...
}
Thanks.
2016-05-30 12:14 PM
jump to main from interrupt = STUPIDITY.
nevermind why assembly for only 1 jump??2016-05-30 02:32 PM
Hi, the ''main function'' were an example ( i can do a reset). In fact, I'm more interested by a jump to another function. And as I try to learn assembler, it's also interesting for me.
Otherwise, my problem is i have a function with many long delay. And i would like to stop it after an interrupt. (long delay are nedded by the app ). Is jump after interupt to another function is stupid ? If yes, what is the usual way to this problem ? ( I also try exit(to_function()); but that not works.) Thanks