Go Down

Topic: WatchDog Timer in MKR1000  (Read 511 times) previous topic - next topic

Bjain

HI,

Is there any way to use watchdog timer in MKR1000 or any other method to perform software reset on a particular condition.


pert

The MKR1000 uses the same ATSAMD21G18 microcontroller as the other MKR boards and the Arduino Zero, so any information you find for those boards will also apply to your MKR1000. In a previous thread where someone asked the same question about the MKR WiFi 1010, Juraj gave a useful looking answer:
reset:  NVIC_SystemReset();

watchdog: https://github.com/adafruit/Adafruit_SleepyDog

Juraj

#2
May 01, 2019, 06:32 am Last Edit: May 01, 2019, 06:38 am by Juraj
for watchdog there is a new library WDTZero https://github.com/javos65/WDTZero

the title of this topic is about watchdog and the post is about reset?

for reset use function NVIC_SystemReset();
Nested Vectored Interrupt Controller is a feature of ARM chips and the function is part of ARM SDK

Bjain

I used Watchdog to reset MKR1000 on a particular condition but t supports maximum duration of 16 seconds only.  How can I increase its duration?

Can you explain in more detail on how to use NVIC_SystemReset(); in MKR1000.

Juraj

I used Watchdog to reset MKR1000 on a particular condition but t supports maximum duration of 16 seconds only.  How can I increase its duration?

Can you explain in more detail on how to use NVIC_SystemReset(); in MKR1000.
the WDTZero library can have a longer watchdog time

you use it, as it is. call NVIC_SystemReset() and the MCU resets

Bjain

I got the library from https://github.com/javos65/WDTZero

But when I added it in the Include Library->add zip library, It said

Code: [Select]
Arduino: 1.8.5 (Windows 8.1), Board: "Arduino/Genuino MKR1000"

Specified folder/zip file does not contain a valid library



pert

The "Add .ZIP Library" installation method requires that the library be in the root of the .zip file. Unfortunately, the author of the WDTZero library put the library in a subfolder of the repository, which adds an extra step to the installation process:
  • Unzip the downloaded .zip file
  • Sketch > Include Library > Add .ZIP Library
  • Select the WDTZero subfolder of the unzipped folder (not the .zip file).
  • Click the "Open" button.


Despite the name, Add .ZIP Library can be used to install libraries from folders as well as .zip files.

Go Up