grbl_stm32f4 icon indicating copy to clipboard operation
grbl_stm32f4 copied to clipboard

Improper initialization operation

Open chunlin007 opened this issue 1 year ago • 1 comments

The implementation of eeprom_init is unreasonable in https://github.com/deadsy/grbl_stm32f4/blob/a70dfca1467828aa3ed2150312247c298f79b76a/grbl/files/eeprom.c#L21 Here, the purpose of this operation is to set all bit of eeprom_data as 0xff, rather than only sizeof(EEPROM_LEN) bytes. A reasonble operation is memset(eeprom_data, 0xff, EEPROM_LEN);

chunlin007 avatar Jun 02 '23 15:06 chunlin007

Thanks. Fixed. btw- the code also inherited a buggy checksum calculation for the original grbl code. It doesn't matter here because it's a fake eeprom, but fyi.

deadsy avatar Jun 02 '23 17:06 deadsy