core icon indicating copy to clipboard operation
core copied to clipboard

IOsender configuration backup breaking gbrlhal permanently

Open BuildItAnyway opened this issue 3 years ago • 1 comments

I was having many weird issues on my Grblhal2k board + IOsender. spindle out would not work (properly), random crashes etc. Re-flashing etc did not help. Tested hardware using simple script to PWM out some items and that all worked fine.

Got a new teensy, programmed the same hex and grbl worked as expected. But my origonal board would not budge. Putting my old backup file on this board -> breaks it permanently -> same result as my original board.

My suspicion was that there is something messed up in the emulated eeprom section on the Teensy. So made simple arduino script -> wrote all (emulated) EEPROM regs to 0xFF -> set settings again manually through IOsender (same as before) -> now it all works.

Hence i suggest a button on IOsender and have to option in GRBLhal to simply overwrite all (emulated) EEPROM settings to 0xFF so you can have a "fresh" start.

Software used: Iosender (XL) 2.0.37 , 2.0.38

Arduino (teensy 4.1) emulated eeprom reset script:

#include <EEPROM.h>

// start reading from the first byte (address 0) of the EEPROM
uint16_t address = 0;
byte value;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  // read a byte from the current address of the EEPROM
  while(address <=4282)
  {
  EEPROM.write(address,0xFF);
  
  Serial.print(address);
  Serial.print("\t");
  Serial.println();
  address = address + 1;
  }
  // advance to the next address of the EEPROM
  
[settings.txt](https://github.com/grblHAL/core/files/8952675/settings.txt)

  
    
  delay(500);
}


Settings file:

`[settings.txt](https://github.com/grblHAL/core/files/8952684/settings.txt)
`

Hardware: GRBLHAL2k

BuildItAnyway avatar Jun 21 '22 20:06 BuildItAnyway

$RST=* reloads default settings and should erase the flash pages used for emulation if any data has been changed. So IMO there is no need to add a new command for erase only.

terjeio avatar Jun 23 '22 10:06 terjeio