There are three versions of these settings (not all settings work this way, but many do):
- The firmware version. Set in configuration.h and configuration_adv.h. These only change when you flash it.
- The eeprom versions. These do not change when you flash it. If you change versions of the firmware, they may be misinterpeted.
- The ones currently loaded in memory while it is running. These are what get used.
When it boots up. It loads the ones from eeprom to memory.
When you change something with gcode, like M92, it changes the ones in memory.
M500 Saves the ones in memory to eeprom
M502 reads the ones from firmware into memory.
When you flash using the sd card, you should also send M502 and then M500 to reset the values in the eeprom to the firmware you just flashed.
After you change something with gcode that you like, use M500 and it is also a good habit to go back to your copy of configuration.h and make the change there so you won’t lose it next time you flash.
There is some logic in the marlin firmware when you substantially change versions, like from v2.0.4 to v2.0.9 which will see that the eeprom is based on an old version of marlin and it will not read from eeprom. So sometimes you might have gotten lucky and not had to do M502/M500. But you shouldn’t depend on that.