bug #34027: avrdude AT90S1200 Problem (part 1 - bitbang

programmers)
* config_gram.y: Introduce new keyword "is_at90s1200".
* lexer.l: (Ditto.)
* avrdude.conf.in: Applew new keyword to the AT90S1200 device.
* avrpart.h: Introduce new flag AVRPART_IS_AT90S1200, reflecting
the is_at90s1200 configuration keyword.
* bitbang.c (bitbang_initialize): Replace existing test for
AT90S1200 by AVRPART_IS_AT90S1200
* avr.c (avr_write_byte_default): Avoid the pre-write reading for
the AT90S1200, as this appears to sometimes corrupt the high byte
by pre-programming the low byte just written into it.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1002 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2011-08-29 09:25:04 +00:00
parent cee2077383
commit 2465726abb
7 changed files with 38 additions and 3 deletions

8
avr.c
View File

@@ -443,11 +443,17 @@ int avr_write_byte_default(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem,
return 0;
}
if (!mem->paged) {
if (!mem->paged &&
(p->flags & AVRPART_IS_AT90S1200) == 0) {
/*
* check to see if the write is necessary by reading the existing
* value and only write if we are changing the value; we can't
* use this optimization for paged addressing.
*
* For mysterious reasons, on the AT90S1200, this read operation
* sometimes causes the high byte of the same word to be
* programmed to the value of the low byte that has just been
* programmed before. Avoid that optimization on this device.
*/
rc = pgm->read_byte(pgm, p, mem, addr, &b);
if (rc != 0) {