Go Down

Topic: Problem with Reset (Read 147 times) previous topic - next topic

Filnet

Hello

I have some problems with RESET.

I want to use Watchdog librairies (compatible MKR) The sketch go well but the reset is not effective and sleep the MKR.

I try to connect pin RESET with GND, result is the same : program is stop but no reset.

Could you help me.

Thanks

NB : when I push RST button (once), it never reset.

Filnet

Somebody can help me?

For instance, when I use Adafruit Watchdog Library Demo :


Here is the monitor loging:

Adafruit Watchdog Library Demo!

Enabled the watchdog with max countdown of 4000 milliseconds!


Looping ten times while resetting the watchdog...
Loop #1
Loop #2
Loop #3
Loop #4
Loop #5
Loop #6
Loop #7
Loop #8
Loop #9
Loop #10

Get ready, the watchdog will reset in 4000 milliseconds!



And no reset, the MKR GSM seems freeze.
I need to upload the sketch for another attempt (Reset button is inefficient)

thinkbetter


Filnet

Thanks for your response.


// Adafruit Watchdog Library Basic Usage Example
//
// Simple example of how to use the watchdog library.
//
// Author: Tony DiCola

#include <Adafruit_SleepyDog.h>

void setup() {
  Serial.begin(115200);
  //while(!Serial); // wait for Arduino Serial Monitor (native USB boards)
  Serial.println("Adafruit Watchdog Library Demo!");
  Serial.println();

  int countdownMS = Watchdog.enable(4000);
  Serial.print("Enabled the watchdog with max countdown of ");
  Serial.print(countdownMS, DEC);
  Serial.println(" milliseconds!");
  Serial.println();

  Serial.println("Looping ten times while resetting the watchdog...");
  for(int i = 1; i <= 10; ++i) {
    Serial.print("Loop #"); Serial.println(i, DEC);
    delay(1000);
    Watchdog.reset();
  }
  Serial.println();

  Watchdog.disable();

  countdownMS = Watchdog.enable(4000);
  Serial.print("Get ready, the watchdog will reset in ");
  Serial.print(countdownMS, DEC);
  Serial.println(" milliseconds!");
  Serial.println();
  delay(countdownMS+1000);
}

void loop() {
  Serial.println("You shouldn't see this message.");
  delay(1000);
  NVIC_SystemReset();
}

Go Up