Again tinkering on my laser cutter got me a new insight to the workings and possible flaws in the Marlin firmware.
Not too sure if the info is of much use for the greater community but for some rare cases that would otherwise need a new controller it might help a lot.
Ok, what happened exactly that I think the EEPROM stuff can wreck your firmware?
Well, not 100% sure if it was an additional "M" when checking machine settings with "M501", saving them or by typing in some out of whack settings in the Pronterface command line.
But I could replicate it now three times already through simple typos while sending manual commands or playing with custom buttons.
It seems that Marlin accepts commands that are not really defined within the firmware, so instead of ignoring a command with the wrong syntax it actually tries to write the bogus somewhere.
And in some cases this causes chaos for all the other stored settings.
What are the symptoms I observed?
To start with the machine did not react as normal during prints.
Axis would suddenly just stutter or the print stops totally for no good reason and resumes a second later - really fun if a powerful laser just sits and ruins your workpiece by burning holes through it.
But in the really bad cases nothing at all would work anymore.
Trying to move an axis always gave "Endstop hit" errors, no matter what direction.
And sometimes the machine would not react at all.
Flashing the firmware from scratch did not help either as by default no EEPROM values are changed.
What are the possible fixes?
As said, flashing your firmware from scratch might not be enough to solve the problem.
I even tried it by first setting all listed EEPROM commands to zero values.
The only thing I found that fixed it for me was to use a sketch from the EEPROM library that allows you to overwrite / delete all EEPROM bytes.
Set to 4096kb instead of the default 512 for the little Arduinos my EEPROM was empty and the firmware install fixed it for good.
I think it would be much better to have an option during a sketch upload to Arduino to actually erase the EEprom if required.