avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] [bug #26703] [Feature Request] Support device reset for 'a


From: anonymous
Subject: [avrdude-dev] [bug #26703] [Feature Request] Support device reset for 'arduino' programmer type
Date: Thu, 28 May 2009 04:42:28 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10

URL:
  <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: address@hidden
             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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]