After erasing an Xmega part, do *not* reinitialize the world, as a

subsequent programming operation will fail (for unknown reasons).
Actually, this was really only required for ancient AVRs, but doesn't
hurt on mega and tiny devices.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@904 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2010-01-11 16:04:29 +00:00
parent a7e45fd3d3
commit d23e035b3b
2 changed files with 8 additions and 3 deletions

View File

@ -4,8 +4,12 @@
* jtagmkII_private.h: Add CMND_XMEGA_ERASE as well as * jtagmkII_private.h: Add CMND_XMEGA_ERASE as well as
the various XMEGA_ERASE_* definitions (from updated the various XMEGA_ERASE_* definitions (from updated
appnote AVR067) appnote AVR067)
* jtagmkII.c (jtagmkII_chip_erase): Correctly implement * jtagmkII.c (jtagmkII_chip_erase): Correctly implement Xmega chip
Xmega chip erase based on CMND_XMEGA_ERASE. erase based on CMND_XMEGA_ERASE. After erasing an Xmega part, do
*not* reinitialize the world, as a subsequent programming
operation will fail (for unknown reasons). Actually, this was
really only required for ancient AVRs, but doesn't hurt on mega
and tiny devices.
* jtagmkII.c (jtagmkII_pre_write): Remove, this turned out * jtagmkII.c (jtagmkII_pre_write): Remove, this turned out
to be just a chip erase. to be just a chip erase.
* jtagmkII.c (jtagmkII_program_disable): Don't try reading * jtagmkII.c (jtagmkII_program_disable): Don't try reading

View File

@ -907,6 +907,7 @@ static int jtagmkII_chip_erase(PROGRAMMER * pgm, AVRPART * p)
return -1; return -1;
} }
if (!(p->flags & AVRPART_HAS_PDI))
pgm->initialize(pgm, p); pgm->initialize(pgm, p);
return 0; return 0;