Init watchdog last in setup()

2.0.x
Scott Lahteine 7 years ago
parent 8d32fd997f
commit 317673fec3

@ -710,10 +710,6 @@ void setup() {
if (mcu & 32) SERIAL_ECHOLNPGM(MSG_SOFTWARE_RESET); if (mcu & 32) SERIAL_ECHOLNPGM(MSG_SOFTWARE_RESET);
HAL_clear_reset_source(); HAL_clear_reset_source();
#if ENABLED(USE_WATCHDOG) //reinit watchdog after HAL_get_reset_source call
watchdog_init();
#endif
SERIAL_ECHOPGM(MSG_MARLIN); SERIAL_ECHOPGM(MSG_MARLIN);
SERIAL_CHAR(' '); SERIAL_CHAR(' ');
SERIAL_ECHOLNPGM(SHORT_BUILD_VERSION); SERIAL_ECHOLNPGM(SHORT_BUILD_VERSION);
@ -879,6 +875,10 @@ void setup() {
#if ENABLED(PARKING_EXTRUDER) #if ENABLED(PARKING_EXTRUDER)
pe_magnet_init(); pe_magnet_init();
#endif #endif
#if ENABLED(USE_WATCHDOG) // Reinit watchdog after HAL_get_reset_source call
watchdog_init();
#endif
} }
/** /**

Loading…
Cancel
Save