Prusa-MMU-Private
PrusaMultiMaterialUpgradev3firmwareforMK3SMK4
error_codes.h
Go to the documentation of this file.
1 #pragma once
3 #include <stdint.h>
4 
17 enum class ErrorCode : uint_fast16_t {
18  RUNNING = 0x0000,
19  OK = 0x0001,
20 
21  // TMC bit masks
22  TMC_PULLEY_BIT = 0x0040,
23  TMC_SELECTOR_BIT = 0x0080,
24  TMC_IDLER_BIT = 0x0100,
25 
27  FINDA_DIDNT_SWITCH_ON = 0x8001,
28  FINDA_DIDNT_SWITCH_OFF = 0x8002,
29 
30  FSENSOR_DIDNT_SWITCH_ON = 0x8003,
31  FSENSOR_DIDNT_SWITCH_OFF = 0x8004,
32 
33  FILAMENT_ALREADY_LOADED = 0x8005,
34 
35  INVALID_TOOL = 0x8006,
36 
37  HOMING_FAILED = 0x8007,
41 
43 
44  FSENSOR_TOO_EARLY = 0x8009,
48 
49  FINDA_FLICKERS = 0x800a,
51 
52  MOVE_FAILED = 0x800b,
56 
57  FILAMENT_EJECTED = 0x800c,
58 
59  MCU_UNDERVOLTAGE_VCC = 0x800d,
60 
61  LOAD_TO_EXTRUDER_FAILED = 0x802a,
62  QUEUE_FULL = 0x802b,
63  VERSION_MISMATCH = 0x802c,
64  PROTOCOL_ERROR = 0x802d,
65  MMU_NOT_RESPONDING = 0x802e,
66  INTERNAL = 0x802f,
67 
73  TMC_IOIN_MISMATCH = 0x8200,
74 
83  TMC_RESET = 0x8400,
84 
91 
97  TMC_SHORT_TO_GROUND = 0x9000,
98 
106  TMC_OVER_TEMPERATURE_WARN = 0xA000,
107 
116 
122 };
ErrorCode
Definition: error_codes.h:17
@ FSENSOR_DIDNT_SWITCH_OFF
E32772 Filament sensor didn't switch off while performing UnloadFilament.
@ INTERNAL
E32815 internal runtime error (software)
@ PROTOCOL_ERROR
E32813 internal error of the printer - communication with the MMU got garbled - protocol decoder coul...
@ TMC_UNDERVOLTAGE_ON_CHARGE_PUMP
@ FILAMENT_ALREADY_LOADED
E32773 cannot perform operation LoadFilament or move the selector as the filament is already loaded.
@ RUNNING
the operation is still running - keep this value as ZERO as it is used for initialization of error co...
@ MOVE_PULLEY_FAILED
E32841 the Pulley was unable to move - unused at the time of creation, but added for completeness.
@ FINDA_FLICKERS
The user is obliged to inspect FINDA and tune its switching.
@ TMC_IOIN_MISMATCH
@ FINDA_DIDNT_SWITCH_ON
Unload Filament related error codes.
@ MOVE_IDLER_FAILED
E33033 the Idler was unable to move - unused at the time of creation, but added for completeness.
@ HOMING_IDLER_FAILED
E33031 the Idler was unable to home properly - that means something is blocking its movement.
@ FINDA_VS_EEPROM_DISREPANCY
E32776 FINDA is pressed but we have no such record in EEPROM - this can only happen at the start of t...
@ TMC_IDLER_BIT
+256 TMC Pulley bit
@ FILAMENT_EJECTED
Filament was ejected, waiting for user input - technically, this is not an error.
@ VERSION_MISMATCH
E32812 internal error of the printer - incompatible version of the MMU FW.
@ TMC_OVER_TEMPERATURE_WARN
@ TMC_OVER_TEMPERATURE_ERROR
@ MOVE_SELECTOR_FAILED
E32905 the Selector was unable to move to desired position properly - that means something is blockin...
@ INVALID_TOOL
E32774 tool/slot index out of range (typically issuing T5 into an MMU with just 5 slots - valid range...
@ FSENSOR_DIDNT_SWITCH_ON
E32771 Filament sensor didn't switch on while performing LoadFilament.
@ MMU_NOT_RESPONDING
E32814 internal error of the printer - communication with the MMU is not working.
@ MOVE_FAILED
generic move failed error - always reported with the corresponding axis bit set (Idler or Selector) a...
@ TMC_PULLEY_BIT
+64 TMC Pulley bit
@ MMU_SOLDERING_NEEDS_ATTENTION
@ STALLED_PULLEY
E32839 for the Pulley "homing" means just StallGuard detected during Pulley's operation (Pulley doesn...
@ TMC_SELECTOR_BIT
+128 TMC Pulley bit
@ OK
the operation finished OK
@ FINDA_DIDNT_SWITCH_OFF
E32770 FINDA didn't switch off while unloading filament.
@ TMC_SHORT_TO_GROUND
@ QUEUE_FULL
E32811 internal logic error - attempt to move with a full queue.
@ HOMING_FAILED
generic homing failed error - always reported with the corresponding axis bit set (Idler or Selector)...
@ FSENSOR_TOO_EARLY
@ HOMING_SELECTOR_FAILED
E32903 the Selector was unable to home properly - that means something is blocking its movement.
@ LOAD_TO_EXTRUDER_FAILED
E32811 internal error of the printer - try-load-unload sequence detected missing filament -> failed l...
@ MCU_UNDERVOLTAGE_VCC
MCU VCC rail undervoltage.