InterruptIn - Restart Program

08 Dec 2010

Hi all,

I'm having a problem with my program on LPC1768. A "cancel" button on Pin 7 has to reset all the digital outputs on my LPC1768 and restart the main routine.

I wanted to implement this with the InterruptIn event. It all works out perfect, but i don't want the event to jump back to line, the program had been interrupted. I want it to jump to the start of the main routine. How can i implement this?

Thought of setting a flag for the while loop, but i got several while loops and i don't want to modify all the while loops with the flag. Isn't there a possibility to jump out of the interrupt event into beginning of the main routine?

Thanks in advance,

Markus

08 Dec 2010

Thx for your answer. But how can i reset the program back to start? Whats the command?

08 Dec 2010

You can use mbed_reset(), but this will restart the whole program, reinit all variables etc. Not sure if that's what you want.

08 Dec 2010

Thanks a lot Igor! Thats exactly what I've been searching for! :-)