AVR Downloader/UploaDEr - Patches: patch #7559, 'arduino' programmer type DTR...
You are not allowed to post comments on this tracker with your current authentication level.
patch #7559: 'arduino' programmer type DTR transition fix
Submitter: | Robert Spitzenpfeil <madworm> | ||
Submitted: | Mon 20 Jun 2011 06:19:17 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Wont Do | Privacy: | Public |
Assigned to: | joerg_wunsch | Open/Closed: | Open |
Jump to the original submission
Fri 09 Sep 2011 10:10:37 PM UTC, comment #31: |
Robert Spitzenpfeil <madworm> |
Wed 24 Aug 2011 03:49:57 PM UTC, comment #30:
|
Joerg Wunsch <joerg_wunsch>![]() ![]() |
Wed 24 Aug 2011 03:28:15 PM UTC, comment #29: Would it be possible to at least
|
Robert Spitzenpfeil <madworm> |
Wed 24 Aug 2011 02:57:35 PM UTC, comment #28: OK, I'm closing it as "won't do" then. The discussion can
|
Joerg Wunsch <joerg_wunsch>![]() ![]() |
Wed 24 Aug 2011 02:52:58 PM UTC, comment #27: I appreciate your desire to make this as portable as possible, but I don't think we should worry about true RS232 connections for a few reasons:
|
David A. Mellis <mellis> |
Wed 24 Aug 2011 02:37:35 PM UTC, comment #26: 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.
|
Robert Spitzenpfeil <madworm> |
Wed 24 Aug 2011 02:16:06 PM UTC, comment #25: No changes to the code are needed. The current (SVN) avrdude correctly resets Arduino boards on upload.
|
David A. Mellis <mellis> |
Wed 24 Aug 2011 02:02:49 PM UTC, comment #24: Can someone summarize for me the action to take?
|
Joerg Wunsch <joerg_wunsch>![]() ![]() |
Mon 25 Jul 2011 06:07:50 AM UTC, comment #23: There was a hardware bug in my 2nd board, so after repairing that both boards upload and reset equally well with your proposed toggle patches Robert. |
Bernard Johnson <bjohnson> |
Tue 19 Jul 2011 10:27:10 AM UTC, comment #22: There are level shifter ICs... as you know very well. And e.g. the MAX232 doesn't translate more than RX/TX.
|
Robert Spitzenpfeil <madworm> |
Tue 19 Jul 2011 01:20:07 AM UTC, comment #21: If someone hooked up an AVR to a real RS-232 interface, the +-12V would probably blow it up. So I think the code is fine.
|
David A. Mellis <mellis> |
Mon 18 Jul 2011 06:40:49 PM UTC, comment #20: And another one...
|
Robert Spitzenpfeil <madworm> |
Mon 18 Jul 2011 06:32:55 PM UTC, comment #19: Hmmm. I have the strong urge to slap someone over the head with a stinking wet fish. But probably they are already dead... this is like hunting a misguided minus-sign on pages after pages of formulae.
|
Robert Spitzenpfeil <madworm> |
Mon 18 Jul 2011 04:57:13 PM UTC, comment #18: Those are real full-swing (e.g. +-12V) RS-232 voltages. The voltage levels are inverted for TTL (0 to 5V) serial, so the data signals are 5V for a logic 1 and 0V for a logic 0 (whereas -12V is a logic 1 for the data signals of full-swing serial) and the control signals (apparently) become 0V for logic 1 and 5V for logic 0. |
David A. Mellis <mellis> |
Mon 18 Jul 2011 03:43:28 PM UTC, comment #17: I have abandoned windows almost completely.
|
Robert Spitzenpfeil <madworm> |
Mon 18 Jul 2011 02:59:16 PM UTC, comment #16: Have you checked the behavior on Windows? There, I believe that a call to ser_set_dtr_rts(1) brings the lines low and 0 brings the line high. So patch #7100 brought the two OS's (Windows and Posix) into alignment: i.e. interpreting a 1 to mean "set the corresponding bit in the control register", which, on both operating systems, sets the physical line low. But someone should probably verify this, since it's been a while since I tested it and my notes are a bit obscure.
|
David A. Mellis <mellis> |
Sun 17 Jul 2011 08:51:12 PM UTC, comment #15: Forget about what I've said about the ioctl(). The logic in there is reversed as well.
|
Robert Spitzenpfeil <madworm> |
Sun 17 Jul 2011 08:45:00 PM UTC, comment #14: Hmmm. Not on my system.
|
Robert Spitzenpfeil <madworm> |
Sun 17 Jul 2011 06:35:12 PM UTC, comment #13: Have you tried the latest avrdude from SVN?
|
David A. Mellis <mellis> |
Sat 16 Jul 2011 11:22:16 PM UTC, comment #12: "I do not know. There are several things I can't adequately explain with this board yet."
|
Bernard Johnson <bjohnson> |
Sat 16 Jul 2011 11:12:54 PM UTC, comment #11: "I don't want to turn this into a "which patch is better" discussion"
|
Bernard Johnson <bjohnson> |
Sat 16 Jul 2011 10:25:33 PM UTC, comment #10: Only the comments in 'ser_posix.c' are quite misleading. If clearing a bit in a register actually sets the signal line to high and vice versa. Almost like clearing an interrupt flag in an AVR by writing a 1 to the bit.
|
Robert Spitzenpfeil <madworm> |
Sat 16 Jul 2011 10:15:03 PM UTC, comment #9: OK. On linux + FTDI chip, these are the facts. Measured with my logic analyzer on the DTR line.
|
Robert Spitzenpfeil <madworm> |
Sat 16 Jul 2011 09:12:28 PM UTC, comment #8: Hmmm.
|
Robert Spitzenpfeil <madworm> |
Sat 16 Jul 2011 08:36:17 PM UTC, comment #7: I said serial_close below but I meant arduino_close. |
Bernard Johnson <bjohnson> |
Sat 16 Jul 2011 08:35:44 PM UTC, comment #6: Actually, if you look at my patch and then look at ser_win32.c, my patch makes the logic work the same on both platforms. Windows has always been bulletproof (and I can't tell you how much it bothers me that it wasn't on Linux). Once I made that change, it became just as reliable under Linux for me (Uno).
|
Bernard Johnson <bjohnson> |
Sat 16 Jul 2011 05:48:16 PM UTC, comment #5: Info:
|
Robert Spitzenpfeil <madworm> |
Sat 16 Jul 2011 03:34:21 PM UTC, comment #4: Another option would be to introduce
|
Robert Spitzenpfeil <madworm> |
Sat 16 Jul 2011 12:28:59 PM UTC, comment #3: In the piece of code you've referred to it seems to be 'inverse logic'. That is if it gets a '1' it clears some bits. Yes.
|
Robert Spitzenpfeil <madworm> |
Sat 16 Jul 2011 09:36:03 AM UTC, comment #2: Actually, I think you got better results by accident. Isn't the logic in ser_posix.c ser_set_dtr_rts backwards?
|
Bernard Johnson <bjohnson> |
Mon 20 Jun 2011 06:24:55 PM UTC, comment #1: I have tested this with some of my projects, which are loaded with the 'optiboot' bootloader. So far it works 100%.
|
Robert Spitzenpfeil <madworm> |
Mon 20 Jun 2011 06:19:17 PM UTC, original submission:
It came to my attention that I could only upload every 2nd try to my bootloaded AVR chip (or 'Arduino' if you like). The first pass would fail and I would abort avrdude (the chip was not reset). With the old code this left the DTR line in a usable state for the next run, which then succeeded reproducibly.
|
Robert Spitzenpfeil <madworm> |
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 10 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2011-08-24 | joerg_wunsch | Open/Closed | Closed | ![]() |
Open |
2011-08-24 | joerg_wunsch | Status | Need Info | ![]() |
Wont Do |
Assigned to | None | ![]() |
joerg_wunsch | ||
Open/Closed | Open | ![]() |
Closed | ||
2011-08-24 | joerg_wunsch | Status | None | ![]() |
Need Info |
2011-07-17 | madworm | Attached File | - | ![]() |
Added test_dtr.c, #23669 |
2011-07-16 | madworm | Attached File | - | ![]() |
Added 0003-Added-serial_toggle_dtr_rts__just_testing___.patch, #23663 |
2011-07-16 | madworm | Attached File | - | ![]() |
Added g3215.png, #23662 |
2011-07-16 | bjohnson | Attached File | - | ![]() |
Added rev-logic.patch, #23660 |
2011-06-20 | madworm | Attached File | - | ![]() |
Added arduino.c.patch, #23541 |
@mellis:
I will cook something up for arduino.c (comments only, but they might be extensive).