You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading EEPROM via avrdude using wiring (via bootloader) - results are corrupted. Every other 8 bytes are lost. Writing to EEPROM works, but, as expected, validation fails as what is written does not match corrupted version that is read back.
You can reproduce on Mega2560(and probably others using this bootloader) using following sketch to initialize EEPROM to known state:
#include<EEPROM.h>voideepromDump() {
char buff[8];
int counter = 0;
byte data = 0;
Serial.write("EEPROM contents:\n");
for (int i = 0; i < 4096 ; i++) {
counter = counter % 16;
if (counter == 0) {
snprintf(buff, 10, "%07X", i);
if (i != 0) {
Serial.println();
}
Serial.print(buff);
}
data = EEPROM.read(i);
snprintf(buff, 4, " %02X", data);
Serial.print(buff);
counter ++;
}
Serial.println();
}
voideepromErase(int start){
Serial.println("Erasing EEPROM");
for (int addr=start; addr <4096; addr++){ EEPROM.update(addr, 0x00); }
}
voidsetup() {
Serial.begin(115200L);
constchar data[63]="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
EEPROM.put(0, data);
eepromErase(64);
eepromDump();
}
voidloop() {
}
After that if executing a read via a programmer you get expected correct output:
When reading EEPROM via avrdude using wiring (via bootloader) - results are corrupted. Every other 8 bytes are lost. Writing to EEPROM works, but, as expected, validation fails as what is written does not match corrupted version that is read back.
You can reproduce on Mega2560(and probably others using this bootloader) using following sketch to initialize EEPROM to known state:
After that if executing a read via a programmer you get expected correct output:
But using the bootloader for same thing you get corrupted output:
The text was updated successfully, but these errors were encountered: