From ec5cbf73b90070fa9ce58cfc9628dd72f8cb03ea Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Sun, 26 Jan 2020 14:24:53 +0100 Subject: [PATCH] During PP keep the watchdog waiting for longer When the printer is connected to a USB host during a PP (and the host does not lose power), the rambo can linger for longer, sometimes for long enough to recover the print state. Drain some more power. --- Firmware/Marlin_main.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index f5bccffe..b3b0376c 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -10625,10 +10625,11 @@ void uvlo_() plan_buffer_line_curposXYZE(500, active_extruder); st_synchronize(); #endif -wdt_enable(WDTO_500MS); -WRITE(BEEPER,HIGH); -while(1) - ; + + // burn all that residual power + wdt_enable(WDTO_1S); + WRITE(BEEPER,HIGH); + while(1); } @@ -10672,10 +10673,10 @@ eeprom_update_byte((uint8_t*)EEPROM_UVLO,2); // Increment power failure counter eeprom_update_byte((uint8_t*)EEPROM_POWER_COUNT, eeprom_read_byte((uint8_t*)EEPROM_POWER_COUNT) + 1); eeprom_update_word((uint16_t*)EEPROM_POWER_COUNT_TOT, eeprom_read_word((uint16_t*)EEPROM_POWER_COUNT_TOT) + 1); -wdt_enable(WDTO_500MS); -WRITE(BEEPER,HIGH); -while(1) - ; + // burn all that residual power + wdt_enable(WDTO_1S); + WRITE(BEEPER,HIGH); + while(1); } #endif //UVLO_SUPPORT