diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index eb703187a4..bf887c254e 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -8581,14 +8581,15 @@ SERIAL_PROTOCOLPGM("\n\n"); } break; /*! - ### M709 - MMU reset M709: MMU reset - The MK3S cannot not power off the MMU, for that reason the functionality is not supported. + ### M709 - MMU power & reset M709: MMU power & reset + The MK3S cannot not power off the MMU, but we can en- and disable the MMU. #### Usage - M709 [ X ] + M709 [ S | X ] #### Parameters - - `X` - Reset MMU (0:soft reset | 1:hardware reset) + - `X` - Reset MMU (0:soft reset | 1:hardware reset | 42: erease MMU eeprom) + - `S` - En-/disable the MMU (0:off | 1:on) #### Example @@ -8596,9 +8597,28 @@ SERIAL_PROTOCOLPGM("\n\n"); M709 X1 - toggle the MMU's reset pin (hardware reset) + M709 S1 - enable MMU + + M709 S0 - disable MMU + + M709 - Serial message if en- or disabled */ case 709: { + if (code_seen('S')) + { + switch (code_value_uint8()) + { + case 0: + MMU2::mmu2.Stop(); + break; + case 1: + MMU2::mmu2.Start(); + break; + default: + break; + } + } if (MMU2::mmu2.Enabled() && code_seen('X')) { switch (code_value_uint8()) @@ -8609,10 +8629,14 @@ SERIAL_PROTOCOLPGM("\n\n"); case 1: MMU2::mmu2.Reset(MMU2::MMU2::ResetPin); break; + case 42: + MMU2::mmu2.Reset(MMU2::MMU2::EraseEEPROM); + break; default: break; } } + printf_P(_n("MMU state:%d\n"), MMU2::mmu2.Enabled()); } break;