<p>From the <a href="http://marlinfw.org/docs/gcode/M502.html" rel="nofollow noreferrer"><code>M502</code> documentation page</a> can be read that <code>M502</code>:</p>

<blockquote>
  <p>Reset all configurable settings to their factory defaults.</p>
</blockquote>

<p><sub><em>Please note that this phrasing from the manual has been used in the question title!</em></sub></p>

<blockquote>
  <p>To also reset settings in EEPROM, follow with M500.</p>
</blockquote>

<p>Note that:</p>

<blockquote>
  <p>This command can be used even if EEPROM_SETTINGS is disabled.</p>
</blockquote>

<p>The question is what is the definition of <em>"all configurable settings"</em>?</p>

<p>Are these the settings that are displayed with <a href="http://marlinfw.org/docs/gcode/M503.html" rel="nofollow noreferrer"><code>M503</code></a>, or are there hidden settings?</p>

[{'answer_id': 11439, 'author': 'towe', 'author_id': 13171, 'author_profile': 'https://3dprinting.stackexchange.com/users/13171', 'pm_score': 4, 'selected': True, 'text': '<p>What Marlin does when <code>M502</code> is called is defined in the <a href="https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/Marlin/src/module/configuration_store.cpp" rel="noreferrer"><code>configuration_store.cpp</code></a> file.</p>\n\n<p>It resets:</p>\n\n<ul>\n<li>Max acceleration</li>\n<li>Steps per mm</li>\n<li>Max feedrate / speed</li>\n<li>Min segment time</li>\n<li>Acceleration (Normal, Retract, Travel)</li>\n<li>Min feedrate</li>\n<li>Min travel feedrate</li>\n<li>Jerk settings</li>\n<li>Junction deviation</li>\n<li>Home and SCARA offsets</li>\n<li>Hot end offsets</li>\n<li>Filament runout sensor distance</li>\n<li>Tool change parameters (Swap length, extra prime, prime speed, retract speed, Park \npositions, Z raise)</li>\n<li>Backlash correction distances and smoothing parameters</li>\n<li>Extensible UI</li>\n<li>Magnetic parking extruder settings</li>\n<li>ABL (fade height, stored points, nozzle offset, servo angles</li>\n<li>Delta calibration data (Height, Endstop offset, radius, rod length, segments per \nsecond, calibration radius, trim angle)</li>\n<li>Dual / triple endstop adjustments</li>\n<li>Preheat parameters</li>\n<li>PID parameters</li>\n<li>self-defined thermistors</li>\n<li>LCD contrast</li>\n<li>Power loss recovery</li>\n<li>Firmware retraction</li>\n<li>Filament diameter (for volumetric extrusion)</li>\n<li>Endstops (if disabled)</li>\n<li>Stepper drivers</li>\n<li>Linear advance parameters</li>\n<li>Motor currents (digipot)</li>\n<li>CNC coordinate system (if selected)</li>\n<li>Skew correction parameters</li>\n<li>Advance pause filament change lengths</li>\n</ul>\n'}, {'answer_id': 11440, 'author': 'Trish', 'author_id': 8884, 'author_profile': 'https://3dprinting.stackexchange.com/users/8884', 'pm_score': 2, 'selected': False, 'text': '<p>Technically, the description as "factory settings" is misguiding, as the settings called up are much better described as "firmware defined settings". But since Firmware upgrades usually are rare and far between, these settings can be considered "factory" for the usual user, even as we always urge users to test if their firmware <a href="https://3dprinting.stackexchange.com/questions/8466/what-is-thermal-runaway-protection">has TRP enabled</a> and upgrade if not so. </p>\n\n<p>Depending on the firmware, this usually means the settings described in <a href="https://3dprinting.stackexchange.com/a/11439/8884">this answer</a>, but it could also be more narrow or extend to different and custom settings inside the firmware. Marlin, when it uses <a href="https://sebastian.expert/enable-disable-eeprom-commands-marlin/" rel="nofollow noreferrer">EEPROM_SETTINGS</a>, uses <code>Configurations.h</code> and the additional <code>Configurations_adv.h</code> to define what the factory settings are.</p>\n\n<p>For example in <a href="https://3dprinting.stackexchange.com/q/11410/8884">this question</a> the firmware defined the additional settings in <code>Configuration_adv.h</code>. Installing firmware does not by itself alter the EEPROM, so these settings needed to be <em>seeded into SRAM</em> via <a href="http://marlinfw.org/docs/gcode/M500.html" rel="nofollow noreferrer"><code>M502</code></a> and then <em>saved into EEPROM</em> via <a href="http://marlinfw.org/docs/gcode/M500.html" rel="nofollow noreferrer"><code>M500</code></a>. </p>\n\n<p>The remaining commands in the <code>M50X</code> series are obviously <a href="http://marlinfw.org/docs/gcode/M500.html" rel="nofollow noreferrer"><code>M501</code></a> and <a href="http://marlinfw.org/docs/gcode/M500.html" rel="nofollow noreferrer"><code>M503</code></a>. <code>M501</code> overwrites the SRAM settings with those from the EEPROM, useful if you toy with the SRAM settings to troubleshoot or play with offsets in a somewhat safe manner. <code>M503</code> in turn reports all settings currently in the SRAM, which can be changed during running. Most of these settings can be stored into the EEPROM, if EEPROM_SETTINGS is enabled, but they don\'t necessarily have to come from the EEPROM at the moment, as they can be altered due to a lot of reasons. Your G-code to print could call for example <code>G20</code> and <code>M149 K</code> just to mess with you by swapping to Inches and Kelvin, but that would be easily fixable by recalling <code>M501</code>. This following <code>M503</code> output was given as an example by <a href="https://sebastian.expert/marlin-g-codes-m500-m501-m502-m503/" rel="nofollow noreferrer">Sebastian.expert</a>:</p>\n\n<pre><code>G21    ; Units in mm\nM149 C ; Units in Celsius\nFilament settings: Disabled\nM200 D1.75\nM200 D0\nSteps per unit:\nM92 X100.00 Y100.00 Z398.70 E100.00\nMaximum feedrates (units/s):\nM203 X400.00 Y400.00 Z8.00 E50.00\nMaximum Acceleration (units/s2):\nM201 X1000 Y1000 Z100 E10000\nAcceleration (units/s2): P R T\nM204 P400.00 R1000.00 T1000.00\nAdvanced: S T B X Z E\nM205 S0.00 T0.00 B20000 X10.00 Y10.00 Z0.30 E5.00\nHome offset:\nM206 X0.00 Y0.00 Z0.00\nAuto Bed Leveling:\nM420 S1 Z0.00\nMaterial heatup parameters:\nM145 S0 H195 B55 F0\nM145 S1 H205 B60 F0\nPID settings:\nM301 P52.25 I5.60 D122.00\nZ-Probe Offset (mm):\nM851 Z-2.41\n</code></pre>\n\n<p>Note that with a <a href="https://3dprinting.stackexchange.com/questions/10573/what-is-a-printer-console-terminal">console or terminal</a>, you could sometimes alter EEPROM settings directly via a UI. Among the terminals I know to have this ability is Repetier Host.</p>\n'}]
['https://3dprinting.stackexchange.com/questions/11438', 'https://3dprinting.stackexchange.com', 'https://3dprinting.stackexchange.com/users/5740/']