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
71e437432f
commit
4822833ce4
|
@ -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>
|
||||
|
||||
* stk500v2.c: Use stk500isp_read_byte/stk500isp_write_byte for
|
||||
|
|
2
NEWS
2
NEWS
|
@ -22,6 +22,8 @@ Current:
|
|||
|
||||
* Bugfixes
|
||||
- bug #22248: Read efuse error (partial fix)
|
||||
- bug #42267: jtag3isp fails to read lock and fuse bytes directly
|
||||
after changing lock byte
|
||||
|
||||
* Internals:
|
||||
- ...
|
||||
|
|
19
stk500v2.c
19
stk500v2.c
|
@ -2241,19 +2241,16 @@ static int stk500isp_write_byte(PROGRAMMER * pgm, AVRPART * p, AVRMEM * mem,
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (buf[0] == CMD_PROGRAM_FUSE_ISP) {
|
||||
/*
|
||||
* The JTAGICE3 needs one leave progmode / enter progmode cycle
|
||||
* after writing fuses, before being able to read them back.
|
||||
* Prevent verification readback to be too fast, see
|
||||
* https://savannah.nongnu.org/bugs/index.php?42267
|
||||
*
|
||||
* After all, this is just an ugly hack working around some
|
||||
* brokeness in the Atmel firmware starting with the AVRISPmkII (the
|
||||
* old JTAGICEmkII isn't affected). Let's hope 10 ms of additional
|
||||
* delay are good enough for everyone.
|
||||
*/
|
||||
buf[0] = CMD_LEAVE_PROGMODE_ISP;
|
||||
buf[1] = 1; // preDelay;
|
||||
buf[2] = 1; // postDelay;
|
||||
|
||||
stk500v2_command(pgm, buf, 3, sizeof(buf));
|
||||
|
||||
pgm->program_enable(pgm, p);
|
||||
}
|
||||
usleep(10000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue