avr-chat
[Top][All Lists]
Advanced

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

Re: [avr-chat] EEMPROM Error with ATtiny1634


From: Bernhard Rittirsch
Subject: Re: [avr-chat] EEMPROM Error with ATtiny1634
Date: Mon, 29 Jan 2018 21:31:13 +0100

Hi Georg,

the write statements are just there for debug purpose... to prove that programming the eeprom via avrdude is overwriting bytes 0-127 when bytes 128... are written. But writing eeprom byte 129 from code works well, hence the chip is correct. Hence I guess somehoe the conf file is wrong?

thanks,
muli

2018-01-28 20:04 GMT+01:00 address@hidden <address@hidden>:
Hi, Im, of cause, not fully following yr system;  but 

what do y want to achive with .. [1] in yr write statements ?  

/g
----Ursprungligt meddelande----
Från : address@hidden
Datum : 2018-01-28 - 01:11 (V)
Till : address@hidden
Ämne : [avr-chat] EEMPROM Error with ATtiny1634


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




reply via email to

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