Skip to main content
2 of 4
added 105 characters in body

The problem of this version of Marlin can be shown in the following piece of code (which is inside EEPROM_RetrieveSettings function):

  for (short i=0;i<4;i++) 
  {
    axis_steps_per_unit[i]=tmp1[i];  
    max_feedrate[i]=tmp2[i];
    max_acceleration_units_per_sq_second[i]=tmp3[i];
    max_length[i]=tmp4[i];
  }

Here max_length is an array of 3 elements, not 4, so the last statement in the loop overrides other variable.

The solution is

  for (short i=0;i<4;i++) 
  {
    axis_steps_per_unit[i]=tmp1[i];  
    max_feedrate[i]=tmp2[i];
    max_acceleration_units_per_sq_second[i]=tmp3[i];
    if(i<3)
        max_length[i]=tmp4[i];
  }

Or

  for (short i=0;i<4;i++) 
  {
    axis_steps_per_unit[i]=tmp1[i];  
    max_feedrate[i]=tmp2[i];
    max_acceleration_units_per_sq_second[i]=tmp3[i];
    if(i < sizeof(tmp4)/sizeof(tmp4[0]))
        max_length[i]=tmp4[i];
  }

Greate thanks to the answer writer and commenter. Without your help I couldn't follow the right track.