[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avrdude-dev] [patch #7559] 'arduino' programmer type DTR transition fix
From: |
Robert Spitzenpfeil |
Subject: |
[avrdude-dev] [patch #7559] 'arduino' programmer type DTR transition fix |
Date: |
Wed, 24 Aug 2011 14:37:35 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0 |
Follow-up Comment #26, patch #7559 (project avrdude):
_Personally_ I'd like to see something that is completely invariant to whether
a _real_ RS232 port/device is connected or a TTL serial adapter, so that it
doesn't matter if signal levels are inverted or not. As I had to find out,
there doesn't seem to be an easy way for the computer to know which is which.
It should always work. There should be comments that explain what is done and
why.
My previously proposed addition of the 'toggle' function would provide just
that, BUT a) I'm not capable of providing the necessary patches to
'ser_win32.c' b) it would also require changes to 'ser_posix.c' as well.
So what to do?
If the bootloader timeout is long enough (really don't know about all optiboot
versions for sure), 'arduino.c' could be modified as such:
------
// explanatory comments should go here...
serial_set_dtr_rts(&pgm->fd, 0);
usleep(50*1000);
serial_set_dtr_rts(&pgm->fd, 1);
usleep(50*1000);
serial_set_dtr_rts(&pgm->fd, 0);
usleep(50*1000);
serial_set_dtr_rts(&pgm->fd, 1);
usleep(50*1000);
------
This would provide at least one usable (5V/0V) transition for the reset
capacitor to be pulled in the right direction, regardless what 'HIGH' actually
means.
I could do some reliability testing on homebrew and a Diecimila board using
various bootloaders, but only on linux.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?7559>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/