Adafruit_Learning_System_Guides icon indicating copy to clipboard operation
Adafruit_Learning_System_Guides copied to clipboard

ArduinoISP.ino does not properly handle word-based address for EEPROM read/write

Open x0urc3 opened this issue 3 years ago • 2 comments

Steps to reproduce Reading and writing EEPROM using Adafruit ArduinoISP.ino will cause Bad EEPROM data. The official Arduino ArduinoISP.ino does not have similar issue. See avrdudes/avrdude/issues/990

Possible solution The read and write EEPROM function does not handle word-based address. The high address byte is 0x00 in both function. https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/0090edd636158f91e5356d7806f3f21cea0c9cde/ArduinoISP/ArduinoISP/ArduinoISP.ino#L550-L557 https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/0090edd636158f91e5356d7806f3f21cea0c9cde/ArduinoISP/ArduinoISP/ArduinoISP.ino#L487-L496

x0urc3 avatar Jun 14 '22 18:06 x0urc3

Please submit a pull request if at all possible.

TheKitty avatar Jun 14 '22 19:06 TheKitty

FYI, Arduino's example has the fix back in Dec 2011. https://github.com/arduino/arduino-examples/commit/ea98fc8f98713fe8b896e2bd813a1fa409419deb

Specific fix here. https://github.com/rsbohn/ArduinoISP/commit/bc480b0a23678d15ad9659395a5ce6fcbc26b4e5

mcuee avatar Jun 14 '22 23:06 mcuee