Follow-up Comment #2, patch #6878 (project avr-libc): There is a problem using r20 register: it is used to count bytes to write in eewr_block (look in eedef.h) that uses eewr_byte function. If you use that register you will overwrite the counter and the eeprom_write_block function will not work anymore.
There is another point: there's no need to look for NVM busy after a buffer erase, it will not erase eeprom locations but only the buffer. I tested the eewr_byte function with all the write/update functions (word/dword/block) because they all uses the byte write function. I suggest to update the CVS with this file, no need to change the other write and update functions. P.S. The function 'eeprom_write_r18' uses one more scratch register, r17. Update "readme_eeprom.txt" accordingly. (file #18534) _______________________________________________________ Additional Item Attachment: File name: eewr_byte.S Size:4 KB _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/patch/?6878> _______________________________________________ Messaggio inviato con/da Savannah http://savannah.nongnu.org/ _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev