[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avrdude-dev] [bug #43626] Inconsistent timeouts in stk500v2
From: |
Matthijs Kooijman |
Subject: |
[avrdude-dev] [bug #43626] Inconsistent timeouts in stk500v2 |
Date: |
Mon, 17 Nov 2014 16:42:52 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.1.0 |
URL:
<http://savannah.nongnu.org/bugs/?43626>
Summary: Inconsistent timeouts in stk500v2
Project: AVR Downloader/UploaDEr
Submitted by: matthijs
Submitted on: Mon 17 Nov 2014 04:42:50 PM GMT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name: Matthijs Kooijman
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
While investigating a problem, I noticed the timeouts for stk500v2_recv are a
bit inconsistent. In particular, ser_posix defines:
long serial_recv_timeout = 5000; /* ms */
While stk500v2.c defines:
#define SERIAL_TIMEOUT 2
In practice, I think this means that when no data is being received,
serial_recv blocks for 5 seconds. However, when a byte (that is not the final
byte in the packet) _is_ received, > 2 seconds after stk500v2_recv was called,
it returns a timeout immediately.
Effectively this means that there's 3 seconds spent waiting for data this
won't be processed anyway (unless it's the last byte).
Additionally, it seems that the 5 second timeout coincides with the timeout
specified by AVR068 for "data" packets and it seems useful to let avrdude
timeout (and thus retry) before the stk500 times out.
> The total timeout period is from a command is sent to the answer must be
> completely received. The total timeout period is 200 ms for the
> CMD_SIGN_ON command, 5 seconds for the CMD_READ/PROGRAM_FLASH/EEPROM
> commands, and 1 second for all other commands.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?43626>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [avrdude-dev] [bug #43626] Inconsistent timeouts in stk500v2,
Matthijs Kooijman <=