Commit 3c330618 authored by Scott Lahteine's avatar Scott Lahteine Committed by Scott Lahteine

Attempt to prevent watchdog reset (failed)

parent 585a75c4
......@@ -11051,6 +11051,10 @@ void setup() {
disableStepperDrivers();
#endif
#if ENABLED(USE_WATCHDOG)
watchdog_init();
#endif
MYSERIAL.begin(BAUDRATE);
SERIAL_PROTOCOLLNPGM("start");
SERIAL_ECHO_START;
......@@ -11100,10 +11104,6 @@ void setup() {
thermalManager.init(); // Initialize temperature loop
#if ENABLED(USE_WATCHDOG)
watchdog_init();
#endif
stepper.init(); // Initialize stepper, this enables interrupts!
servo_init();
......
......@@ -22,20 +22,18 @@
#ifdef ARDUINO_ARCH_SAM
#include "../../../Marlin.h"
#include "../../../MarlinConfig.h"
#if ENABLED(USE_WATCHDOG)
#if ENABLED(USE_WATCHDOG)
#include "watchdog_Due.h"
#include "watchdog_Due.h"
// Initialize watchdog with a 4 second interrupt time
void watchdogSetup(void) { watchdogEnable(4000); }
void watchdogSetup(void) {
// do whatever. don't remove this function.
}
// TODO: implement for Due
void watchdog_init() {
// this is a stub
}
void watchdog_init(void) { watchdogEnable(4000); }
#endif // USE_WATCHDOG
#endif // USE_WATCHDOG
#endif
......@@ -27,8 +27,11 @@
// Arduino Due core now has watchdog support
// Initialize watchdog with a 4 second interrupt time
void watchdog_init();
// Reset watchdog. MUST be called at least every 4 seconds after the
// first watchdog_init or AVR will go into emergency procedures.
inline void watchdog_reset() { watchdogReset(); }
#endif /* WATCHDOG_DUE_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment