Pages: [1]   Go Down
Author Topic: Can't get Arduino Uno into DFU mode  (Read 9662 times)
0 Members and 1 Guest are viewing this topic.
Portland area, Oregon, USA
Offline Offline
Newbie
*
Karma: 2
Posts: 15
Was using PICBasic, now Arduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to load new firmware into my Arduino Uno via dfu-programmer, but I haven't been able to get the board into DFU mode.  The Uno was working fine, then I uploaded a bad sketch that keeps me from uploading any more ("programmer is not responding" errors) - so I'm hoping that reburning the Uno's firmware will solve the problem. See http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1295238402 for the thread about my bad sketch.

Versions:
Fedora 14
Arduino software version 21
dfu-programmer 0.5.1
computer: an old Toshiba laptop with 512MB ram, 40GB disk, and a 2GHz Pentium 4. (could old USB ports be my problem?)


I tried based on instructions in http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1285962838/10
- Plug in the Usb cable as you always do for programming the board.
- Ground the Atmega8U2 Reset pin (ICSP1 pin 5 on the schematic).
- Ground the Atmega8U2 HWB pin (C5, DTR side on the schematic).
- Release the grounded Reset pin.
- Release the grounded HWB pin.

My impression from the thread I mentioned above is that if the Uno has successfully been put in DFU mode, it should appear as device "Arduino Uno DFU" rather than just "Arduino Uno".

The last few lines of dmesg output before and after doing the Uno reset sequence above looks like this:

===== Before doing the reset sequence =====
[14986.783056] hub 2-0:1.0: over-current change on port 2
[14987.206090] usb 2-2: new full speed USB device using uhci_hcd and address 10
[14987.392058] usb 2-2: New USB device found, idVendor=2341, idProduct=0001
[14987.392067] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[14987.392073] usb 2-2: Product: Arduino Uno
[14987.392078] usb 2-2: Manufacturer: Arduino (www.arduino.cc)
[14987.392083] usb 2-2: SerialNumber: 6493234363835141F0C0
[14987.397275] cdc_acm 2-2:1.0: ttyACM0: USB ACM device

========= After doing the reset sequence =====
[14986.783056] hub 2-0:1.0: over-current change on port 2
[14987.206090] usb 2-2: new full speed USB device using uhci_hcd and address 10
[14987.392058] usb 2-2: New USB device found, idVendor=2341, idProduct=0001
[14987.392067] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[14987.392073] usb 2-2: Product: Arduino Uno
[14987.392078] usb 2-2: Manufacturer: Arduino (www.arduino.cc)
[14987.392083] usb 2-2: SerialNumber: 6493234363835141F0C0
[14987.397275] cdc_acm 2-2:1.0: ttyACM0: USB ACM device
(that is, the dmesg output is unchanged)

So it looks to me like the reset sequence isn't causing my OS to see the Uno unplug itself and the Uno DFU appear.

====== lsusb output after the reset sequence
Bus 002 Device 010: ID 2341:0001  
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 014: ID 045e:00f6 Microsoft Corp.
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
(the Microsoft device is a USB mouse.  I get the same symptom without the mouse, and on each of the laptops two USB ports)

Also, when I run dfu-programmer after the reset sequence, I get the following:
[root@blaptop bneedham]# dfu-programmer at90usb82 erase
dfu-programmer: no device present.

After the reset sequence above, the Uno's pin 13 Led blinks 3 times, then comes on steady (that's my old sketch running).

So, I suspect that the sequence above isn't successfully resetting the Atmeta8U2.  I'm wondering whether grounding the ICSP1 pin 5 is, for some reason, not causing the Atmega8U2 to reset.

Any troubleshooting ideas?

So, can someone confirm how to know whether the Uno is in DFU mode?

Thanks.

Logged

Offline Offline
God Member
*****
Karma: 32
Posts: 507
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try putting an LED between GND and the 8u2 ICSP reset pad (the right way round obviously), it should dimly glow and reset the 8u2 too. You can use the USB socket body as a more convenient source of GND for that, or ICSP pin 6, whichever is easiest.

Both dmesg and lsusb should confirm the device mode change. If there's just a reset without a mode change dmesg should confirm that too.
« Last Edit: January 17, 2011, 06:12:49 pm by stimmer » Logged


Portland area, Oregon, USA
Offline Offline
Newbie
*
Karma: 2
Posts: 15
Was using PICBasic, now Arduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, I now have some new ideas to try.

On a related note, I see from the Atmega8u2-mu datasheet that the HWB pin is sampled on reset, so that tells me the reset sequence above (release reset before HWB) is correct.

I also found from the datasheet that there's a power-on reset (duh), so that gives me an idea: I think I'll try connecting HWB to ground before plugging in the USB cable, then releasing HWB once the board is clearly powered up.  I'll let you know how that goes.

Another idea I have: on holding Reset low, the HWB/DTR pin should, I think float.  If, on the other hand, I'm not holding Reset low when I think I am holding it low, the HWB/DTR pin should be an output pin and being driven high.  I'm not exactly sure how to tell the difference between a floating pin and a driven-high one, but I think that should be easy to find (e.g., connecting a 10K resistor to gnd should pull down a floating pin, but not a driven-high pin, no?)
Logged

Offline Offline
God Member
*****
Karma: 32
Posts: 507
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have very sharp eyes (and a sharp piece of wire) the 8u2 reset pin is on the corner of the 8u2 nearest the ICSP pads. The pins next to it are unconnected inputs. So you could try grounding it directly.

If that doesn't reset it it could be that your chip has been misprogrammed and the reset pin is disabled by the fuse bits. Or your board may be faulty.
Logged


Portland area, Oregon, USA
Offline Offline
Newbie
*
Karma: 2
Posts: 15
Was using PICBasic, now Arduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Looking at the 8u2 under a magnifying glass, it looks like the solder on 2 sides of the chip is lacking.

So I'm going to order another, good Uno that I can compare it to.
Logged

Pages: [1]   Go Up
Jump to: