Contributed by <avrdude@zevv.nl> as
patch #4372: Better synchronization for stk500 Sync three times, and drop any noise inbetween. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@641 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
0da2134afc
commit
86f70682e2
|
@ -1,3 +1,9 @@
|
|||
2006-09-01 Joerg Wunsch <j@uriah.heep.sax.de>
|
||||
|
||||
Contributed by <avrdude@zevv.nl> as
|
||||
patch #4372: Better synchronization for stk500
|
||||
* stk500.c: Sync three times, and drop any noise inbetween.
|
||||
|
||||
2006-09-01 Joerg Wunsch <j@uriah.heep.sax.de>
|
||||
|
||||
* avrdude.conf.in (ATtiny261, ATtiny461, ATtiny861): new
|
||||
|
|
10
stk500.c
10
stk500.c
|
@ -90,6 +90,16 @@ static int stk500_getsync(PROGRAMMER * pgm)
|
|||
* get in sync */
|
||||
buf[0] = Cmnd_STK_GET_SYNC;
|
||||
buf[1] = Sync_CRC_EOP;
|
||||
|
||||
/*
|
||||
* First send and drain a few times to get rid of line noise
|
||||
*/
|
||||
|
||||
stk500_send(pgm, buf, 2);
|
||||
stk500_drain(pgm, 0);
|
||||
stk500_send(pgm, buf, 2);
|
||||
stk500_drain(pgm, 0);
|
||||
|
||||
stk500_send(pgm, buf, 2);
|
||||
stk500_recv(pgm, resp, 1);
|
||||
if (resp[0] != Resp_STK_INSYNC) {
|
||||
|
|
Loading…
Reference in New Issue