Restart with interrupt

For C and ASSEMBLY users to post questions and code snippets for programming in C and ASSEMBLY. And for any other C or ASM course related questions.

Moderators: Benj, Mods

Post Reply
User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Restart with interrupt

Post by Jan Lichtenbelt »

Is it possible to restart the program (jump to label main) on an interrupt (with laving the interrupt on a correct way)?

Thanks for help

Kind regards

Jan Lichtenbelt

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Restart with interrupt

Post by Benj »

Hello Jan,

In BoostC there is a inbuilt C function you can use.

reset();

Is this any good?

Otherwise you can switch on the watchdog timer using C code and then wait for it to time out which will reset the device.

Post Reply