[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Uisp-dev] [bug #15189] uisp somtimes fails to work in Mac OS X due to a
From: |
anonymous |
Subject: |
[Uisp-dev] [bug #15189] uisp somtimes fails to work in Mac OS X due to a small bug in PL 2303 driver |
Date: |
Sun, 11 Dec 2005 20:24:43 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/416.11 (KHTML, like Gecko) Safari/416.12 |
URL:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=15189>
Summary: uisp somtimes fails to work in Mac OS X due to a
small bug in PL 2303 driver
Project: AVR In-System Programmer
Submitted by: None
Submitted on: Sun 12/11/05 at 20:24
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Email: address@hidden
Open/Closed: Open
_______________________________________________________
Details:
There seems to be a bug in the latest version of Prolific PL-2303 Mac OS X
driver (V1.1.0b1), causing uisp not to be able to connect to Stk500 at first
try. Retrying helps. This bug implements a retry around Stk500
initialisation.
--- uisp-20050207/src/Stk500.C 2004-12-28 15:54:11.000000000 +0100
+++ uisp.modified/src/Stk500.C 2005-12-11 21:20:15.000000000 +0100
@@ -625,8 +625,19 @@
TByte num_ext_parms = 3;
+#define MAXTRY 5
memcpy(buf, pSTK500, sizeof(pSTK500));
- Send(buf, sizeof(pSTK500), sizeof(pSTK500_Reply));
+ for (int i = 0; i < MAXTRY; i++) {
+ try {
+ Send(buf, sizeof(pSTK500), sizeof(pSTK500_Reply));
+ break;
+ } catch (Error_Device& errDev) {
+ errDev.print();
+ if (i < MAXTRY)
+ Info(0,"Retrying %d more times.\n", MAXTRY - i - 1);
+ }
+ }
+#undef MAXTRY
if (memcmp(buf, pSTK500_Reply, sizeof(pSTK500_Reply)) != 0) {
throw Error_Device ("[VP 1] Device is not responding correctly."); }
_______________________________________________________
Carbon-Copy List:
CC Address | Comment
------------------------------------+-----------------------------
pekka --DOT-- nikander --AT-- iki --DOT-- fi | Originator Email
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=15189>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Uisp-dev] [bug #15189] uisp somtimes fails to work in Mac OS X due to a small bug in PL 2303 driver,
anonymous <=