Maybe lock fuses? Best regards Martin 2018-01-28 20:04 GMT+01:00 [email protected] < [email protected]>:
> 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 : [email protected] > Datum : 2018-01-28 - 01:11 (V) > Till : [email protected] > Ä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 > > > > _______________________________________________ > AVR-chat mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/avr-chat > >
_______________________________________________ AVR-chat mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avr-chat
