bug #41561: AVRDUDE 6.0.1/USBasp doesn't write first bytes of

flash page
* usbasp.c (usbasp_spi_paged_write): Remove USBASP_BLOCKFLAG_LAST.
It is no longer needed, as we always write full pages now in paged
write mode.

This prevents each flash page from being written twice, where the
second attempt on older devices (ATmega64/128) signalled an immediate
"ready" condition when polling (likely a silicon bug) even though they
were still in progress.  This caused the USBasp firmware to proceed,
and fill the page buffer anew which eventually caused the data
corruption.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1343 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2014-11-20 09:20:44 +00:00
parent d1af80102d
commit 95da7a137b
3 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2014-11-20 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
bug #41561: AVRDUDE 6.0.1/USBasp doesn't write first bytes of
flash page
* usbasp.c (usbasp_spi_paged_write): Remove USBASP_BLOCKFLAG_LAST.
It is no longer needed, as we always write full pages now in paged
write mode.
2014-11-19 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
bug #43626: Inconsistent timeouts in stk500v2

2
NEWS
View File

@ -24,6 +24,8 @@ Current:
- bug #22248: Read efuse error (partial fix)
- bug #42267: jtag3isp fails to read lock and fuse bytes directly
after changing lock byte
- bug #41561: AVRDUDE 6.0.1/USBasp doesn't write first bytes of
flash page
* Internals:
- ...

View File

@ -795,7 +795,6 @@ static int usbasp_spi_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
if (wbytes <= blocksize) {
blocksize = wbytes;
blockflags |= USBASP_BLOCKFLAG_LAST;
}
wbytes -= blocksize;