Open GoogleCodeExporter opened 9 years ago
[deleted comment]
I have now fixed this problem with a change to avrdude and a change to mega-isp
- the correct patch is detailed below. The idea is to flush the receive queue
in ArduinoISP so that case '0' - signon does not respond to multiple signon
attempts from avrdude it only responds to one signon attempt. Without this fix
ArduinoISP is not in sync with avrdude because it sends multiple signon
responses and the second and third signon response are incorrectly interpreted
as responses to subsequent avrdude messages. The fix in avrdude is included
fyi so that you can test this change.
avrdude-5.11svn-20111019/arduino.c
99c99,101
< usleep(50*1000);
---
>
> /* Sleep to allow the Arduino board to reset */
> usleep(1000*1000);
ArduinoISP/ArduinoISP.ino
452c452,460
< empty_reply();
---
> if (getch() == CRC_EOP) {
> // empty the input stream
> while (0<Serial.available()) getch();
> Serial.print((char)STK_INSYNC);
> Serial.print((char)STK_OK);
> } else {
> error++;
> Serial.print((char)STK_NOSYNC);
> }
Original comment by pete...@gmail.com
on 1 Jul 2013 at 8:50
Note I have also created a bug in the avrdude project for this issue see
https://savannah.nongnu.org/bugs/index.php?39526
Patch files for the fix are attached
Original comment by pete...@gmail.com
on 19 Jul 2013 at 1:42
Attachments:
Original issue reported on code.google.com by
pete...@gmail.com
on 30 Jun 2013 at 8:40