AVR Downloader/UploaDEr - Bugs: bug #56584, Arduino double reset before...
You are not allowed to post comments on this tracker with your current authentication level.
bug #56584: Arduino double reset before programming (TIOCM_DTR clear/set swapped)
Submitter: | spike <spike> | ||
Submitted: | Sun 07 Jul 2019 03:01:17 AM UTC | ||
Category: | None | Severity: | 3 - Normal |
Priority: | 5 - Normal | Item Group: | None |
Status: | None | Privacy: | Public |
Assigned to: | None | Originator Name: | spike |
Open/Closed: | Open | Release: | SVN snapshot |
Programmer hardware: | Device type: | arduino |
Tue 03 Dec 2019 07:16:02 PM UTC, comment #2: |
David Grayson <davidegrayson> |
Sun 07 Jul 2019 08:07:14 PM UTC, comment #1: Pretty much the same patch was already submitted (along with a really nice explanation) back in 2011: https://savannah.nongnu.org/patch/download.php?file_id=23541
|
spike <spike> |
Sun 07 Jul 2019 03:01:17 AM UTC, original submission:
Whenever I'm using the Arduino programmer (i.e. -carduino) the device to be programmed is reset twice, roughly within 250ms before the DTR pin is actually pulled low and data is pushed out the usb port. I've made some screenshots to illustrate the point:
|
spike <spike> |
No files currently attached
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.
Hello. The existing code in AVRDUDE is correct. We need to set DTR to 0 for some time to ensure that the the DTR pin is high and that the capacitor discharges. (Both sides of the capacitor will be high after it discharges.) Then we need to set DTR to 1, which causes a falling edge on the DTR pin, which sends a low pulse to the AVR's reset line. The reset line gradually rises back to a high level as the capacitor charges.
This code is probably redundant on some operating systems, like macOS, where DTR line automatically gets set high when you connect to a serial port. But it's needed on Windows with usbser.sys, and in general.