---------------------------------------------------------------------- Patch name: patch.increase-serial-timeout Author: Bryce Denney Date: Wed Jun 12 13:02:02 EDT 2002 Detailed description: When programming an ATmega with self-programming, the erase command sometimes takes more than 1 second. The serial timeout causes the operation to "fail" even though it's actually doing exactly the right thing. Increasing it to 2 makes it work on my system, but it presumably depends on the clock speed of the target processor. I suggest that we increase the timeout to 5 to be safe. If the timeout was increased just for the erase command, that would work too. Patch was created with: cvs diff -u Apply patch to what version: release from 10/25/2001 Instructions: To patch, go to main uisp directory. Type "patch -p0 < THIS_PATCH_FILE". ---------------------------------------------------------------------- Index: src/Serial.C =================================================================== RCS file: /usr/src/CVSROOT/uisp/src/Serial.C,v retrieving revision 1.8 diff -u -r1.8 Serial.C --- src/Serial.C 2002/06/12 20:03:30 1.8 +++ src/Serial.C 2002/06/12 23:44:26 @@ -73,7 +73,7 @@ int TSerial::Send(unsigned char* queue, int queue_size, int rec_queue_size){ Tx(queue, queue_size); struct timeval time_out; - time_out.tv_sec = 1; + time_out.tv_sec = 5; #if 0 time_out.tv_sec = 1000; // boost up timeout for debugging #endif