I am trying to make a program that interrupts my main function. After the interrupt function has run, I want to restart the main function from the start, instead of just continuing where it stopped. How can I do this?
Thanks!
Ton
Hi all,
I am trying to make a program that interrupts my main function. After the interrupt function has run, I want to restart the main function from the start, instead of just continuing where it stopped. How can I do this?
Thanks!
Ton
The first thing that comes to mind is using the watch dog timer, and in the main function kick it regularly with a short (but appropriate) time and then in the interrupt just go into an infinite loop.
I am trying to make a program that interrupts my main function. After the interrupt function has run, I want to restart the main function from the start, instead of just continuing where it stopped. How can I do this?
Thanks!
Ton
The first thing that comes to mind is using the watch dog timer, and in the main function kick it regularly with a short (but appropriate) time and then in the interrupt just go into an infinite loop.
<<quote tonverra>>
Hi all,
I am trying to make a program that interrupts my main function. After the interrupt function has run, I want to restart the main function from the start, instead of just continuing where it stopped. How can I do this?
Thanks!
Ton
<</quote>>
Thanks for you answer, but wouldn't that reset all my values as well?
I can perform a reset in the end of my interrupt, but by doing that all my value are gone..
I've solved it for now by speeding up the program after an interrupt is done, so that it FastForwards through the whole thing, but that isn't the best solution.
Thanks for you answer, but wouldn't that reset all my values as well?
I can perform a reset in the end of my interrupt, but by doing that all my value are gone..
I've solved it for now by speeding up the program after an interrupt is done, so that it FastForwards through the whole thing, but that isn't the best solution.
Thanks for you answer, but wouldn't that reset all my values as well?
I can perform a reset in the end of my interrupt, but by doing that all my value are gone..
Yes, you're of course correct regarding the values. A small misunderstanding on my part... I was confused by "restart the main function from the start" and what you meant by that. Anyway, good you solved your issue.
Take care,
Anthony
<<quote tonverra>>
Thanks for you answer, but wouldn't that reset all my values as well?
I can perform a reset in the end of my interrupt, but by doing that all my value are gone..
<</quote>>
Yes, you're of course correct regarding the values. A small misunderstanding on my part... I was confused by "restart the main function from the start" and what you meant by that. Anyway, good you solved your issue.
Take care,
Anthony
Important Information for this Arm website
This site uses cookies to store information on your computer.
By continuing to use our site, you consent to our cookies.
If you are not happy with the use of these cookies, please review our
Cookie Policy
to learn how they can be disabled.
By disabling cookies, some features of the site will not work.
Access Warning
You do not have the correct permissions to perform this operation.
Hi all,
I am trying to make a program that interrupts my main function. After the interrupt function has run, I want to restart the main function from the start, instead of just continuing where it stopped. How can I do this?
Thanks!
Ton