Go Down

Topic: Uno upload requires manual reset :-[ (Read 4197 times) previous topic - next topic

JimG

Operating system:  Windows XP
Arduino IDE: 0022
Arduino board:  Uno
Has never loaded without manual reset. 
Has never failed when using manual reset immediately before avrdude starts.
Messages:
Code: [Select]
avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "C:\Program Files\arduino-0022\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM11
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 115200
avrdude: ser_open(): setting dtr
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x18
avrdude: Send: Q [51]   [20]
avrdude: Recv:
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x18

avrdude done.  Thank you.


I've had the same problem with this Uno on two different computers, both XP.  I have successfully used both of those computers with multiple Duemilanove, RBBB, Pro Mini, FTDI cables, etc.

No software running on either machine that interferes with COM ports.  No firewalls that watch COM's, AFAIK (McAfee Total Protection)

Strikes me as a pretty serious Uno bug.  What am I missing?

Jim


MarkT

Have you visually checked the "RESET-EN" link and the attached capacitor?  These are near pin 14 of the 328p - the link should be intact between the two solder pads for auto-reset to work.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

pluggy

8U2 firmware bug ?.  Early versions were decidedly reluctant to talk to the IDE if there was any serial going on in the uploaded sketch.  Do a search on 'update 8u2 firmware' .

http://pluggy.is-a-geek.com/index.html

JimG

@MarkT:  Good suggestion, thanks.  But the RESET-EN pads are connected on my Uno.  Confirmed visually and with a meter.

@pluggy:  I've been hoping it wouldn't come to that  :0

Mostly I've been hoping that the Uno's weren't shipped with a bug in the firmware.

Jim

pluggy

#4
Apr 13, 2011, 07:18 am Last Edit: Apr 13, 2011, 07:21 am by pluggy Reason: 1
Its pretty painless.  I've had no difficulty at all with it and according to those that know better than I, it doesn't brick anything if it fails, you just do it again.  The original Uno shipped with a dodgy bootloader as well as the 8U2 bug, a bit of a mess. The bootloader in 0022 is still flakey.  The official documentation makes a meal of getting it into DFU mode, this is the easy way:

http://pluggy.is-a-geek.com/index.html

JimG

Thank you, again, pluggy.

I think I've read in other threads here that the 8U2 firmware update is recommended for connecting with Linux/Unix platforms.  I don't recall seeing it mentioned in association with XP.

But if that's the only viable solution, I'll give it a go.

My biggest concern with this solution is the thought of supporting a group of new Arduino users associated with an open source shield I've helped develop for instrumentation of coffee roasters.  Uploading new firmware to their Uno would be more than most of them signed up for.

Jim

JimG

I have installed the new 8U2 firmware using pluggy's two-wire method of enabling DFU.  Fairly simple procedure (except the recipe on Arduino.cc leaves out the part about needing to install a USB DFU driver with an .inf file in the Flip distribution).

The bad news is that the problem persists, using multiple XP computers.  Still need to manually reset the Uno before a sketch can upload.  Other suggestions?

Jim

JimG

I should add that I am seeing 3 quick flashes on the RX LED, followed by a ~10 second pause, and then one final RX flash before avrdude gives up and issues the error messages.

Jim

JimG

The plot thickens.  I have now noticed that the Uno doesn't handle two-way serial communications correctly, and I think this is related to the autoreset problem.

I have an application which sends a "RESET\n" command to an arduino from a processing application (data logger).  The Duemilanove "hears" this command each and every time it is sent, even though it is busy sending a dataset every second back to the host WinXP PC.

But when I loaded the same sketch into the Uno board, the application became broken.  I found that the initial "RESET\n" command has to be issued twice or the Uno won't hear it.  Then I did some experimenting using the IDE serial monitor.

What I learned is that after a new connection is opened between the PC and the Uno, the first incoming communication is not heard by the Uno.  After the first one, all subsequent commands from the PC are heard just fine.  It stays this way until a new connection is established between COM13 (in my case) and the Uno.

The other oddity is that the Duemilanove resets every time a new serial connection is established, but the Uno doesn't.

I'm sure these differences are the root cause of the autoreset problem, but I don't know enough about how usbser.sys and the 8U2 communicate with one another to figure out how to fix it.

Anyone?

Jim

JimG

#9
Apr 16, 2011, 04:46 pm Last Edit: Apr 16, 2011, 05:04 pm by JimG Reason: 1
I bypassed the 8U2 chip on my Uno and connected it to my PC with an FTDI cable ( schematic ).

I ran FTDI RTS --> 0.1u --> Uno/RESET socket on the POWER header. This is the way the Pro Mini is configured.

The Uno now works like it should.  Autoreset works correctly for uploading sketches.  Serial communications work again.  The RTS signal on the FTDI cable is apparently the key.

But the Uno schematic shows the 8U2 RTS signal (pin 12) unconnected.  Instead, the 8U2 connects CTS (pin 13) to RESET.  

So, let's check and see if the FTDI driver jiggles the CTS line? When I tie the CTS signal on the FTDI cable to the RESET line, things get broken again.  So the CTS signal on the FTDI cable won't cause an autoreset.

Windows must jiggle only the RTS line with the FTDI driver.  For the 8U2 to cause autoreset, I think Windows would have to jiggle CTS.  Unless there is a way to force XP to jiggle CTS over its usbser driver, this looks like an unsolvable problem with the Uno and XP.

Maybe unrelated, but the Duemilanove connects RTS to RESET through a small resistor rather than leave it unconnected.

What am I missing?

Jim

EDIT -- I should note that I have the FTDI driver configured to "Set RTS on close" (in the advanced tab).



mellis

The firmware on the 8U2 sets PD7 according to the state of the DTR pin from the computer.  The Arduino software toggles DTR before an upload, and, in general, this resets the Arduino from Windows XP.  I'm not sure why it wouldn't work with your board / computers. 

JimG


I'm not sure why it wouldn't work with your board / computers. 

Me too.

I'm having the same problem (autoreset doesn't work) with this board on multiple XP computers, and on Mac OS X.  I wonder if a bad 0.1u cap on the Uno would cause these symptoms?

Jim

mellis

Is the other solder jumper (the HWB for the 8U2), on the bottom of the board, connected?  It shouldn't be.

JimG


Is the other solder jumper (the HWB for the 8U2), on the bottom of the board, connected?  It shouldn't be.

Nope, open  :P

While I was checking C5, I'm pretty sure I found a bad via along the trace from C5 to 8U2-13.  I'm going to solder in a jumper and see if that fixes things.

Jim

JimG


I'm pretty sure I found a bad via along the trace from C5 to 8U2-13.

Yup, that was the problem.  A jumper wire fixed it.  What are the odds?

Thanks for the help!

Jim

Go Up