Lengthen delay after reset for benefit of autobaud bootloaders

This commit is contained in:
Stefan Rueger 2022-12-31 12:27:07 +00:00
parent ab3da9f87c
commit ac10272bb6
No known key found for this signature in database
GPG Key ID: B0B4F1FD86B1EC55
3 changed files with 4 additions and 4 deletions

View File

@ -1270,7 +1270,7 @@ frame is programmed.
.It Ar delay=<n> .It Ar delay=<n>
Add a <n> ms delay after reset. This can be useful if a board takes a Add a <n> ms delay after reset. This can be useful if a board takes a
particularly long time to exit from external reset. <n> can be negative, particularly long time to exit from external reset. <n> 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. shortened accordingly.
.It Ar strict .It Ar strict
Urclock has a faster, but slightly different strategy than -c arduino to Urclock has a faster, but slightly different strategy than -c arduino to

View File

@ -1066,7 +1066,7 @@ frame is programmed.
@item @samp{delay=<n>} @item @samp{delay=<n>}
Add a <n> ms delay after reset. This can be useful if a board takes a Add a <n> ms delay after reset. This can be useful if a board takes a
particularly long time to exit from external reset. <n> can be negative, particularly long time to exit from external reset. <n> 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. shortened accordingly.
@item @samp{strict} @item @samp{strict}
Urclock has a faster, but slightly different strategy than -c arduino to Urclock has a faster, but slightly different strategy than -c arduino to

View File

@ -2243,8 +2243,8 @@ static int urclock_open(PROGRAMMER *pgm, const char *port) {
// Set DTR and RTS back to high // Set DTR and RTS back to high
serial_set_dtr_rts(&pgm->fd, 1); serial_set_dtr_rts(&pgm->fd, 1);
if((80+ur.delay) > 0) if((120+ur.delay) > 0)
usleep((80+ur.delay)*1000); // Wait until board comes out of reset usleep((120+ur.delay)*1000); // Wait until board comes out of reset
pmsg_debug("%4ld ms: enter urclock_getsync()\n", avr_mstimestamp()); pmsg_debug("%4ld ms: enter urclock_getsync()\n", avr_mstimestamp());
if(urclock_getsync(pgm) < 0) if(urclock_getsync(pgm) < 0)