Auto-reset fix for Uno and Mega 2650 #22

Closed
wants to merge 2 commits into
from

4 participants

@giseburt

This is a modification of the usbserial code for the 8u2 chip. The intent is to make auto-reset only work when programming, and remain backwards compatible with the software.

I added a check for an about 1 second delay between DTR toggles before the reset line is switched. This allows connection and reconnection from OS X and (untested) Linux without a reset.

Also optimized for size, since this check pushed the size over 4K. It might be a little faster as well.

I've also included HEX files for both UNO and Mega 2650, but I haven't tested the UNO files. (I don't have an UNO, sorry.) I did NOT include the combined HEX file that have the DFU programmer in them.

giseburt added some commits Mar 26, 2011
@giseburt giseburt Make auto-reset only work when programming.
Added a check for an about 1 second delay between DTR toggles before the reset line is switched. This allows connection and reconnection form OS X and (untested) Linux without a reset.

Also optimized for size, since this check pushed the size over 4K. It might be a little faster as well.
3a7dc40
@giseburt giseburt Added hex files for uno and mega 2560.
I haven't tested the UNO file yet.
fec59ca
@damellis
Arduino member

I'd like to keep the current behavior of the 8U2 firmware in this respect. That is, it should merely pass through the DTR state changes made by the operating system. I know the auto-reset on serial connection is annoying in some cases, but it's useful in others and also the established behavior.

@damellis damellis closed this Mar 29, 2011
@giseburt
@andyross

Could we get more discussion about this? Are there alternatives you'd consider? Is giseburt's "knocking" algorithm not acceptable for getting a reset done from the host?

While I accept that the reset behavior is there for legacy compatibility, I honestly consider it a bug. Plugging or unpluging a data cable really shouldn't be resetting the unit by design.

@NicoHood

You wont break older board i think, but the really use of this is minimal. There are so many boards out there delivered with the old firmware, i think this wont help much. You still can do this for your board if you like to via DFU. Thats my opinion.

@igrr igrr added a commit that referenced this pull request Apr 1, 2015
@igrr igrr Enable reset control for generic esp8266 boards
Close #22
8b081eb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment