avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-chat] EEMPROM Error with ATtiny1634


From: Bernhard Rittirsch
Subject: [avr-chat] EEMPROM Error with ATtiny1634
Date: Sun, 28 Jan 2018 01:11:16 +0100

Hi,

I' trying to write an .eep, and get always: "verification error, first mismatch at byte 0x0000"

I was hunting the problem down to with this small code sequence (_writeNumber outputs a byte via the UART):

uint8_t test[5]    EEMEM =  { 3, 4, 5, 6, 7};
uint8_t test2[128]     EEMEM =  { 9, 8, 9, 9, 9};

(...)

 _writeNumber (eeprom_read_byte(&test[1]));
 _writeNumber ((uint8_t)(int)&test[1]);
 _writeNumber (eeprom_read_byte(&test2[1]));
 _writeNumber ((uint8_t)(int)&test2[1]);
 
 eeprom_write_byte (&test[1], 25);
 eeprom_write_byte (&test2[1], 26);
 
 _writeNumber (eeprom_read_byte(&test[1]));
 _writeNumber ((uint8_t)(int)&test[1]);
 _writeNumber (eeprom_read_byte(&test2[1]));
 _writeNumber ((uint8_t)(int)&test2[1]);

I get the following output:
000129 >> test value 2 in EEPROM address 129: is 0, should be 4
004001 >> test2 value 2 in EEPROM address 1: is 4, should be 8
025129 >> just to proove the EEPROM is not currupt - writing address 129 from code works
026001 >> just to proove the EEPROM is not currupt - writing address 1 from code works

It seems like the bytes starting with address 128 get actually written from address 0. Testing the same code with a ATmega1284 works like a charm, hence I assume the .eep file is correct (created with avr-gcc). I was investigating already a bit in the avrdude.conf, but cannot verify if the problem comes from there or from elsewhere. Attached the eep file, and the relevant conf section.

Many thanks for any hint...

best regards,
muli

Attachment: avrdude.conf
Description: Binary data

Attachment: RS232_TINY1634.eep
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]