mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-27 14:35:27 +00:00
Merge pull request #844 from MCUdude/jtagmkii-retry-attempts
jtagmkii: Reduce the number of sync attempts to 10 + print number of attempts
This commit is contained in:
2
NEWS
2
NEWS
@@ -846,7 +846,7 @@ Version 4.3.0:
|
||||
* Added "Troubleshooting"-Appendix to the manual.
|
||||
|
||||
* Add ATmega8515 support.
|
||||
Contributed by: Matthias Wei<EFBFBD>er <matthias@matwei.de>
|
||||
Contributed by: Matthias Weißer <matthias@matwei.de>
|
||||
|
||||
* Add ATmega64 support.
|
||||
Contributed by: Erik Christiansen <erik@dd.nec.com.au>
|
||||
|
@@ -675,7 +675,7 @@ int jtagmkII_recv(PROGRAMMER * pgm, unsigned char **msg) {
|
||||
|
||||
int jtagmkII_getsync(PROGRAMMER * pgm, int mode) {
|
||||
int tries;
|
||||
#define MAXTRIES 33
|
||||
#define MAXTRIES 10
|
||||
unsigned char buf[3], *resp, c = 0xff;
|
||||
int status;
|
||||
unsigned int fwver, hwver;
|
||||
@@ -696,15 +696,14 @@ int jtagmkII_getsync(PROGRAMMER * pgm, int mode) {
|
||||
|
||||
/* Get the sign-on information. */
|
||||
buf[0] = CMND_GET_SIGN_ON;
|
||||
avrdude_message(MSG_NOTICE2, "%s: jtagmkII_getsync(): Sending sign-on command: ",
|
||||
progname);
|
||||
avrdude_message(MSG_NOTICE2, "%s: jtagmkII_getsync() attempt %d of %d: Sending sign-on command: ",
|
||||
progname, tries + 1, MAXTRIES);
|
||||
jtagmkII_send(pgm, buf, 1);
|
||||
|
||||
status = jtagmkII_recv(pgm, &resp);
|
||||
if (status <= 0) {
|
||||
avrdude_message(MSG_INFO, "%s: jtagmkII_getsync(): sign-on command: "
|
||||
"status %d\n",
|
||||
progname, status);
|
||||
avrdude_message(MSG_INFO, "%s: jtagmkII_getsync() attempt %d of %d: sign-on command: status %d\n",
|
||||
progname, tries + 1, MAXTRIES, status);
|
||||
} else if (verbose >= 3) {
|
||||
putc('\n', stderr);
|
||||
jtagmkII_prmsg(pgm, resp, status);
|
||||
|
Reference in New Issue
Block a user