AVR Downloader/UploaDEr - Bugs: bug #35208, avrdude 5.11 on freebsd 8.2-STABLE...
You are not allowed to post comments on this tracker with your current authentication level.
bug #35208: avrdude 5.11 on freebsd 8.2-STABLE does not reset Arduino Uno properly
Submitter: | None | ||
Submitted: | Sun 01 Jan 2012 03:28:25 PM UTC | ||
Category: | None | Severity: | 3 - Normal |
Priority: | 5 - Normal | Item Group: | None |
Status: | Fixed | Privacy: | Public |
Assigned to: | joerg_wunsch | Originator Name: | bob frazier |
Originator Email: | -email is unavailable- | Open/Closed: | Closed |
Release: | None | Programmer hardware: | |
Device type: |
Tue 10 Jan 2012 07:22:56 AM UTC, comment #5: |
Joerg Wunsch <joerg_wunsch>![]() ![]() |
Tue 03 Jan 2012 03:32:52 AM UTC, comment #4: I downloaded avrdude 5.11 and 5.11.1 source, and applied the [equivalent] patch to arduino.c in both versions and successfully tested them under Debian Linux (2.6.32-5-686 kernel), with Arduino 1.0 (compiled from source, modified installation to use compiled avrdude in lieu of the one that ships with the Arduino environment, verified by using 'verbose' upload option). Subsequent regression test was unable to reproduce the original problem in Debian Linux i386, as with FreeBSD-7.2-STABLE. However, neither of the avrdude versions had any problems running with the recommended change applied.
|
bob frazier <bombasticbob> |
Tue 03 Jan 2012 03:22:14 AM UTC, comment #3: Thanks for looking into this!
|
David A. Mellis <mellis> |
Tue 03 Jan 2012 01:38:45 AM UTC, comment #2: I did some 'scope' work on the device and it appears you are correct, i.e. RTS+DTR set to 1 brings the digital line low rather than high. As it turns out adding the extra '1' causes the Uno to reset where it had not been doing so before, but this may have been an anomoly. What works even better is increasing the time delay between setting RTS+DTR to zero and setting RTS+DTR to 1 in the avrdude code. I have added a patch that changes the delay time from 50msec to 250msec, and I have made repeated tests to make sure that the results are consistent. The purpose of the increased time delay is based on what I discovered when I scoped the reset signal. I was literally getting 2 signals, one in which the reset level was usually above 1V during the pulse, and a second one where the level dropped below 1V and (usually) caused a reset. After applying the new patch, the Arduino Uno resets happen consistently and I don't get any more programming errors. |
bob frazier <bombasticbob> |
Mon 02 Jan 2012 07:13:13 PM UTC, comment #1: If I remember correctly, "setting" DTR and RTS actually lowers them to ground and "cleaning" them pulls the pins high. Which means that the current avrdude code should pull the lines high and then low, triggering a reset. Bob, did you check this on a scope or meter? What'd you see?
|
David A. Mellis <mellis> |
Sun 01 Jan 2012 03:28:25 PM UTC, original submission:
in order to program the Arduino Uno there is code in arduino.c that sets the RTS+DTR lines to low, then high again. Unfortunately in FreeBSD 8.2-STABLE the RTS and/or DTR lines may not be in a 'high' state prior to this. To prevent this from becoming a problem, I recommend a simple patch that sets the RTS+DTR to a high state prior to going to low again and back to a high state. The high to low transition is necessary to perform the reset properly, and the patch guarantees it will happen at the right time. It should be pointed out that in earlier versions of FreeBSD (such as 7.2-STABLE), the libusb port was being used and this issue did not show up. So it appears that the code was relying on both the RTS and DTR lines to be set high during a device open. Since this is (apparently) no longer the case, or is not RELIABLY the case, adding the extra 2 lines of code ensures that the lines WILL be in a 'high' state before doing a reset.
|
Anonymous |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2012-01-10 | joerg_wunsch | Status | None | ![]() |
Fixed |
Assigned to | None | ![]() |
joerg_wunsch | ||
Open/Closed | Open | ![]() |
Closed | ||
2012-01-03 | bombasticbob | Attached File | - | ![]() |
Added patch-arduino.c, #24728 |
2012-01-01 | None | Attached File | - | ![]() |
Added patch-arduino.c, #24717 |
Powered by Savane 3.12.
Corresponding source code
Fixed in r1036. Thanks for tracking this down to everyone!