From ac10272bb690a97ead2164c6ef37cc88eef9bc67 Mon Sep 17 00:00:00 2001 From: Stefan Rueger Date: Sat, 31 Dec 2022 12:27:07 +0000 Subject: [PATCH] Lengthen delay after reset for benefit of autobaud bootloaders --- src/avrdude.1 | 2 +- src/doc/avrdude.texi | 2 +- src/urclock.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/avrdude.1 b/src/avrdude.1 index 8e3603a3..41e4a6ad 100644 --- a/src/avrdude.1 +++ b/src/avrdude.1 @@ -1270,7 +1270,7 @@ frame is programmed. .It Ar delay= Add a ms delay after reset. This can be useful if a board takes a particularly long time to exit from external reset. can be negative, -in which case the default 80 ms delay after issuing reset will be +in which case the default 120 ms delay after issuing reset will be shortened accordingly. .It Ar strict Urclock has a faster, but slightly different strategy than -c arduino to diff --git a/src/doc/avrdude.texi b/src/doc/avrdude.texi index a4c66d6c..9e2e3116 100644 --- a/src/doc/avrdude.texi +++ b/src/doc/avrdude.texi @@ -1066,7 +1066,7 @@ frame is programmed. @item @samp{delay=} Add a ms delay after reset. This can be useful if a board takes a particularly long time to exit from external reset. can be negative, -in which case the default 80 ms delay after issuing reset will be +in which case the default 120 ms delay after issuing reset will be shortened accordingly. @item @samp{strict} Urclock has a faster, but slightly different strategy than -c arduino to diff --git a/src/urclock.c b/src/urclock.c index b582d049..33338e46 100644 --- a/src/urclock.c +++ b/src/urclock.c @@ -2243,8 +2243,8 @@ static int urclock_open(PROGRAMMER *pgm, const char *port) { // Set DTR and RTS back to high serial_set_dtr_rts(&pgm->fd, 1); - if((80+ur.delay) > 0) - usleep((80+ur.delay)*1000); // Wait until board comes out of reset + if((120+ur.delay) > 0) + usleep((120+ur.delay)*1000); // Wait until board comes out of reset pmsg_debug("%4ld ms: enter urclock_getsync()\n", avr_mstimestamp()); if(urclock_getsync(pgm) < 0)