[SOLVED]Reset/reboot Industruino D21G with code

Hello everyone,

Previously, I was able to reboot an Instruino 1286 like this :

asm volatile (" jmp 0");

But now with the D21G, this instruction returns an error :

[...]\cckn2r5A.s: Assembler messages:

[...]\cckn2r5A.s:2916: Error: bad instruction `jmp 0'

Any idea on how can I reset/reboot the D21G ?

Many thanks

Tristan Mehamli - Mugen

Tristan Mehamli
Tristan Mehamli
17
| 2 1 1
Asked on 4/19/18, 4:42 PM
0
vote
3438 Views

Hi Tristan, just to add to this; another user has reported that this also works to reset the D21G:

      NVIC_SystemReset(); 

Tom
Tom
5675
| 1 1 3
Answered on 4/20/18, 12:36 AM
0
vote

Hey Tom, thanks for the hint. I will check it out.

Tristan Mehamli
on 4/20/18, 6:39 AM

Found it. WatchDog timer is THE solution.

Two libraries must be added: Adafruit Sleepy Dog (can be found in the library management) and Adafruit ASF Core (this one must be downloaded from github: https://github.com/adafruit/Adafruit_ASFcore and added as a zipped library).

Then this is pretty straightforward: Watchdog.enable(DELAY_IN_MS);

So this problem is solved.

Tristan Mehamli
Tristan Mehamli
17
| 2 1 1
Answered on 4/19/18, 5:12 PM
0
vote

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

43 follower(s)

Stats

Asked: 4/19/18, 4:42 PM
Seen: 3438 times
Last updated: 4/20/18, 12:38 PM