I am trying to get some feedback to verify this bad EEPROM dump from ATmega328p with avrdude 6.3 and 6.3-20171130. I'll be compiling the latest branch and update my observation later.
Test code as follows:
#include <avr/io.h>
#include <avr/eeprom.h>int main(void) {
uint16_t data=0;for (uint16_t i=0; i<1024; i++) {
eeprom_write_word((uint16_t *) i, 0xff);
}for (uint16_t i=0; i<512; i+=0x20) {
eeprom_write_word((uint16_t *) i, data);
data += 0x11;
}for (uint16_t i=0; i<512; i+=0x20) {
data = eeprom_read_word((uint16_t *) i);
}return(0);
}
The content of EEPROM is GOOD when
- Serial printing from the code
- Use avrdude terminal (-t) mode to dump i.e. dump eeprom 0x100 10
The content is BAD when I dump the EEPROM content to a file, the data seems to repeat itself at the 256 boundary i.e. 0x100, 0x200, 0x300. The EEPROM dump file is attached.
avrdude -c stk500v1 -p m328p -P /dev/ttyUSB0 -b 19200 -U eeprom:r:dump.hex:i
I have only seen a similar report bug #61169 for mega2560 using an unspecified custom programmer
UPDATE: 1. Change ArduinoISP to 'Arduino as ISP'