bug #42267: jtag3isp fails to read lock and fuse bytes directly
after changing lock byte * stk500v2.c (stk500isp_write_byte): As a workaround for broken tool firmware, add 10 ms of delay before returning from any single-byte write operation. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1337 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
b348d97620
commit
3d5beb40df
|
@ -1,3 +1,11 @@
|
||||||
|
2014-10-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
|
bug #42267: jtag3isp fails to read lock and fuse bytes directly
|
||||||
|
after changing lock byte
|
||||||
|
* stk500v2.c (stk500isp_write_byte): As a workaround for broken
|
||||||
|
tool firmware, add 10 ms of delay before returning from any
|
||||||
|
single-byte write operation.
|
||||||
|
|
||||||
2014-10-06 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
2014-10-06 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||||
|
|
||||||
* stk500v2.c: Use stk500isp_read_byte/stk500isp_write_byte for
|
* stk500v2.c: Use stk500isp_read_byte/stk500isp_write_byte for
|
||||||
|
|
2
NEWS
2
NEWS
|
@ -22,6 +22,8 @@ Current:
|
||||||
|
|
||||||
* Bugfixes
|
* Bugfixes
|
||||||
- bug #22248: Read efuse error (partial fix)
|
- bug #22248: Read efuse error (partial fix)
|
||||||
|
- bug #42267: jtag3isp fails to read lock and fuse bytes directly
|
||||||
|
after changing lock byte
|
||||||
|
|
||||||
* Internals:
|
* Internals:
|
||||||
- ...
|
- ...
|
||||||
|
|
23
stk500v2.c
23
stk500v2.c
|
@ -2241,19 +2241,16 @@ static int stk500isp_write_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buf[0] == CMD_PROGRAM_FUSE_ISP) {
|
/*
|
||||||
/*
|
* Prevent verification readback to be too fast, see
|
||||||
* The JTAGICE3 needs one leave progmode / enter progmode cycle
|
* https://savannah.nongnu.org/bugs/index.php?42267
|
||||||
* after writing fuses, before being able to read them back.
|
*
|
||||||
*/
|
* After all, this is just an ugly hack working around some
|
||||||
buf[0] = CMD_LEAVE_PROGMODE_ISP;
|
* brokeness in the Atmel firmware starting with the AVRISPmkII (the
|
||||||
buf[1] = 1; // preDelay;
|
* old JTAGICEmkII isn't affected). Let's hope 10 ms of additional
|
||||||
buf[2] = 1; // postDelay;
|
* delay are good enough for everyone.
|
||||||
|
*/
|
||||||
stk500v2_command(pgm, buf, 3, sizeof(buf));
|
usleep(10000);
|
||||||
|
|
||||||
pgm->program_enable(pgm, p);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue