1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-30 15:26:18 +00:00

Init watchdog last in setup()

This commit is contained in:
Scott Lahteine 2018-03-08 17:34:50 -06:00
parent 8d32fd997f
commit 317673fec3

View File

@ -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
} }
/** /**