|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
[bug #26703] [Feature Request] Support device reset for 'arduino' programmer typeURL: <http://savannah.nongnu.org/bugs/?26703> Summary: [Feature Request] Support device reset for 'arduino' programmer type Project: AVR Downloader/UploaDEr Submitted by: None Submitted on: Thu 28 May 2009 04:42:26 AM UTC Category: None Severity: 3 - Normal Priority: 5 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Originator Name: Mark Schultz Originator Email: n9xmj@... Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: Background: Most 'arduino' AVR development boards, such as the Arduino Duemilanove, use a FTDI USB-Serial converter with TxD and RxD outputs connected to the AVR USART RxD and TxD pins. The FTDI FT232RL device appears as a standard serial port on the host, assuming appropriate drivers/OS support is installed. The AVR device on these boards contains a bootloader that emulates a subset of the STK500v1 programmer protocol. It is clear that the latest version of avrdude (v5.6) provides some native support for the Arduino bootloader, as evidenced by examination of both .conf file and the source code itself. The Arduino bootloader is designed such that if it does not detect activity from the host shortly after reset, it will proceed to (attempt to) start the code in the application space. This 'feature' can make it difficult (albeit by no means impossible) to program the device using avrdude, as one must manually assert reset (e.g. push the reset button), start avrdude, then release reset while avrdude is still attempting to handshake with the 'programmer'. The newer Arduino boards, such as the Duemilanove, connect the FTDI FT232RL device RTS and DTR lines to the AVR device reset input. The RTS output is connected to AVR reset via a 100 ohm resistor. The DTR line is "AC coupled" to reset via a 0.1 uF capacitor. Feature/Enhancement Request: (minimal): When the 'arduino' programmer type is selected, have the programming init routine pulse the RTS line on the selected serial port HIGH-LOW-HIGH for a short period of time; 50 mS is suggested but it could be longer or shorter, it simply needs to be long enough to ensure that USB propogation delays are respected and the reset pulse is recognized by the target device. It is also suggested that at the same time the DTR signal be unasserted (brought high). I would think that this could be done near the start of the arduino_initpgm() routine, although I cannot say if this would be the 'appropriate' place to put it. (better): Allow the reset= directive in the avrdude.conf file specify the serial port output signal to receive the high-low-high pulse treatment described above. USe the 'programming indicator LED' setting(s) as well; this setting would specify a signal line that should be brought to one state (typically unasserted/HIGH) just before the reset pin is pulsed, and brought to the opposite state (typically asserted/low) after _ALL_ device operations are completed (e.g. just before avrdude quits). This second "programming indicator" signal specification should be optional, if not specified it would not be used or applied. For either approach, avrdude should delay a bit following the reset pulse before attempting to communicate with the device; again, 50 mS is suggested, and it might not be a bad idea to make both the reset pulse delay and post-reset delay settable via avrdude.conf. The 0.1 uF capacitor that is in circuit between the RTS output of the FTDI device and the AVR -reset input could introduce a short delay in assertion and/or negation of reset (via RTS), depending on what the state of the DTR output is when the reset pulse is applied. The schematic for the Arduino Duemilanove board is available at: http://arduino.cc/en/uploads/Main/arduino-duemilanove-schematic.pdf An examination of this schematic will likely make the comments above more clear. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Thu 28 May 2009 04:42:26 AM UTC Name: Arduino Duemilanove Schematic.pdf Size: 47kB By: None Arduino Duemilanove schematic attached <http://savannah.nongnu.org/bugs/download.php?file_id=18208> _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/bugs/?26703> _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/ _______________________________________________ avrdude-dev mailing list avrdude-dev@... http://lists.nongnu.org/mailman/listinfo/avrdude-dev |
|
|
[bug #26703] [Feature Request] Support device reset for 'arduino' programmer typeFollow-up Comment #1, bug #26703 (project avrdude): > The RTS output is connected to AVR reset > via a 100 ohm resistor. This resistor (R2) is not populated on the Arduino-Duemilanove boards (checked on a ATmega168 and a ATmega328 Duemilanove board). The only way to reset a Arduino-Duemilanove board is the following sequence: 1. set DTR (+5V on the FDTI chip) for more than 2ms to discharge C13 (100nF) via R1 (10kOhm) 2. clear DTR (0V on the FDTI chip) for more than 2ms to bring nRESET of the ATmega to a 0V level _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/bugs/?26703> _______________________________________________ Nachricht geschickt von/durch Savannah http://savannah.nongnu.org/ _______________________________________________ avrdude-dev mailing list avrdude-dev@... http://lists.nongnu.org/mailman/listinfo/avrdude-dev |
|
|
[bug #26703] [Feature Request] Support device reset for 'arduino' programmer typeFollow-up Comment #2, bug #26703 (project avrdude): correction of my previous comment: The signal of the FTDI is inverted (in the default configuration) , so it is in fact DTR# instead of DTR. So the reset sequence becomes: 1. clear DTR (DTR#=+5V on the FDTI chip) for more than 2ms (suggestion: 50ms) to discharge C13 (100nF) via R1 (10kOhm). This step should normally not be necessary when DTR is cleared when the COM device is closed, but especially for Bluetooth devices like the Bluegiga WT-11 of the Arduino-BT together with the Windows XP SP3 Bluetooth stack, DTR keeps its state when the device is closed 2. set DTR (DTR#=0V on the FDTI chip) for more than 2ms to bring nRESET of the ATmega to a 0V level 3. clear DTR on exit (DTR#=5V on the FDTI chip) for more than 2ms. This is also especially for the WT-11. _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/bugs/?26703> _______________________________________________ Nachricht geschickt von/durch Savannah http://savannah.nongnu.org/ _______________________________________________ avrdude-dev mailing list avrdude-dev@... http://lists.nongnu.org/mailman/listinfo/avrdude-dev |
|
|
[bug #26703] [Feature Request] Support device reset for 'arduino' programmer typeFollow-up Comment #3, bug #26703 (project avrdude): A patch which implements the DTR and RTS reset sequences can be found in the patches section: https://savannah.nongnu.org/patch/?6866 _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/bugs/?26703> _______________________________________________ Nachricht geschickt von/durch Savannah http://savannah.nongnu.org/ _______________________________________________ avrdude-dev mailing list avrdude-dev@... http://lists.nongnu.org/mailman/listinfo/avrdude-dev |
|
|
[bug #26703] [Feature Request] Support device reset for 'arduino' programmer typeUpdate of bug #26703 (project avrdude): Status: None => Ready For Test Assigned to: None => mludvig Open/Closed: Open => Analyzed _______________________________________________________ Follow-up Comment #4: DTR/RTS reset support is in SVN now (r845). Please test it on Windows. _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/bugs/?26703> _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/ _______________________________________________ avrdude-dev mailing list avrdude-dev@... http://lists.nongnu.org/mailman/listinfo/avrdude-dev |
| Free embeddable forum powered by Nabble | Forum Help |