bugAVR Downloader/UploaDEr - Bugs: bug #46005, arduino auto-reset invocation is...


You are not allowed to post comments on this tracker with your current authentication level.

bug #46005: arduino auto-reset invocation is outside of retry loop

Submitted by:  None
Submitted on:  Sun 20 Sep 2015 08:49:24 AM UTC  
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Need Info Privacy:  Public
Assigned to:  None Originator Name:  Bill Wesfield
Originator Email:  -email is unavailable- Open/Closed:  Open
Release:  None Programmer hardware: 
Device type: 

Tue 12 Apr 2016 01:05:33 PM UTC, comment #2: 


I tried to fix the DTR handling for Arduino Pro Mini which requires that the DTR is pulled and released before doing the programming. For UNO holding the DTR whole time works but not for Pro Mini.

Did not actually retry with UNO to test if holding the DTR is required or there is a circuit that just cuts it after a moment.

However, the patch which tries both ways in turn shows how the DTR handling is not part of the loop.

(file #36907)

Michal Suchanek <hramrach1>
Sat 31 Oct 2015 08:27:52 PM UTC, comment #1: 

Sorry, it is not quite clear to me which part of the code
(nor even which programmer implementation) you are talking
about.  In particular, I have no idea what might trigger the
DTR toggling on Arduino.

Can you please elaborate a little more?  (I don't have an
Arduino at hand to tinker with.)

Joerg Wunsch <joerg_wunsch>
Project Administrator
Sun 20 Sep 2015 08:49:24 AM UTC, original submission:  

The new avrdude will attempt the upload several times, but apparently the arduino-specific code to toggle DTR (and perform auto-reset) is outside of the retry loop, which means that the board is not reset before each try. On Optiboot-based boards like Uno, which have a one-second bootloader timeout, this will mean that the board has long-since run the application.
On the other hand, sometimes the retries are quick (wrong response, rather than no response?), perhaps giving the host time to flush buffered data or noise, which might be effective...



Attached Files
file #36907:  invert_dtr.patch added by hramrach1 (5KiB - plain/text - patch changing reset semantic)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by hramrach1 (Updated the item)
  • -email is unavailable- added by hramrach1
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-12 hramrach1 Attached File- => Added invert_dtr.patch, #36907
        Carbon-Copy- => Added hramrach1
    2015-10-31 joerg_wunsch StatusNone => Need Info

    Back to the top

    Powered by Savane 3.6