WatchDog Timer in MKR1000

HI,

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

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:

Juraj:
reset: NVIC_SystemReset();

watchdog: GitHub - adafruit/Adafruit_SleepyDog: Arduino library to use the watchdog timer for system reset and low power sleep.

for watchdog there is a new library WDTZero GitHub - javos65/WDTZero: Allows to use the WatchDog functionality for Arduino Zero, MKRZero and MKR1000 only

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

1 Like

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.

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.

the WDTZero library can have a longer watchdog time

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

I got the library from GitHub - javos65/WDTZero: Allows to use the WatchDog functionality for Arduino Zero, MKRZero and MKR1000 only

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

Arduino: 1.8.5 (Windows 8.1), Board: "Arduino/Genuino MKR1000"

Specified folder/zip file does not contain a valid library

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.