Skip to content

Bad EEPROM dump from ATmega328p using Adafruit 'Arduino as ISP' programmer #990

@x0urc3

Description

@x0urc3
  1. Using the following as a simple test case, avrdude (version 7.0-20220610 (6a8f0d9)) produce a bad EEPROM dump.
#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);
}
  1. EEPROM address 0x100 suppose to contain 0x88 and this is verified using serial print and avrdude terminal (-t).
  2. Using memory operation (-U) produce a bad EEPROM dump (
    bad-dump.hex.gz. The data seems to repeat itself at the 256 boundary i.e. 0x100, 0x200, 0x300. Command used are as follows:
 avrdude -c stk500v1 -p m328p -P /dev/ttyUSB0 -b 19200 -U eeprom:r:dump.hex:i

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThe issue doesn't seem to be valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions