Go Down

Topic: DFU atmegau82 even if in DFU mode dfu-programmer does not recognize it (Read 576 times) previous topic - next topic

pc_magas

I have an arduino R1 and I needto reflash the firmware for the serial. what I did was:

I soldered the resistor into Arduino's Atmega8u2 (the very first one) and then I reset atmega8u2 and by wiring the pins as mentioned in: https://www.arduino.cc/en/Hacking/DFUProgramming8U2

I can confirm it via this message over my GNU/Linux machine by running `dmesg` that the arduino is in DFU programming mode:

Code: [Select]

   [ 1544.679504] usb 1-6: new full-speed USB device number 42 using xhci_hcd
   [ 1544.808341] usb 1-6: New USB device found, idVendor=03eb, idProduct=2ff7
   [ 1544.808350] usb 1-6: New USB device strings: Mfr=0, Product=1, SerialNumber=0
   [ 1544.808356] usb 1-6: Product: Arduino Uno DFU
 


I also to confirm that I run `lsusb` and I got the following result:

Code: [Select]

   Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
   Bus 001 Device 002: ID 248a:8367 
   Bus 001 Device 058: ID 03eb:2ff7 Atmel Corp.
   Bus 001 Device 003: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Further indicating to me that arduino is in DFU mode.

The I try to run:

Code: [Select]

sudo dfu-programmer atmega8u2 erase


But for some reason I get the following error:


Code: [Select]

dfu-programmer: no device present.


Do you know why I get this error and how I can fix it?

So far in order to fix that:

1. I installed the latest version of dfu-programmer and compiled from source via https://sourceforge.net/projects/dfu-programmer/files/dfu-programmer/0.7.2/ but still I get the error. I also tried to compile it with `libusb-1.0.0`

2. I also tried [this](https://github.com/swinman/dfu-programmer/tree/libusb_no_device) version with `libusb-1.0.0` but still the same error occurs.

I use ubuntu 16.04 in order to program that.

kprims

03eb:2ff7  at90usb82 DFU bootloader

sudo dfu-programmer at90usb82 erase

pc_magas

Code: [Select]
03eb:2ff7  at90usb82 DFU bootloader
The question is how did you figure this out? I am asking because someone else may have the same problem in order to understand the nature of it better.

kprims

#3
Apr 22, 2018, 04:48 pm Last Edit: Apr 22, 2018, 05:35 pm by kprims Reason: Added avrdude burn info.
I just found it by searching.

Code: [Select]
Google 03eb:2ff7 Atmel Corp
Google 03eb:2ff7 dfu


http://www.linux-usb.org/usb.ids

Another way to do it.

Code: [Select]
~/Downloads/arduino-1.8.5/hardware/arduino/avr/firmwares/atmegaxxu2 $ ls
Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex  arduino-usbserial README.txt
Arduino-COMBINED-dfu-usbserial-atmega16u2-MegaADK-Rev3.hex   Genuino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-R3.hex UNO-dfu_and_usbserial_combined.hex
Arduino-COMBINED-dfu-usbserial-atmega16u2-Uno-Rev3.hex      Genuino-COMBINED-dfu-usbserial-atmega16u2-Uno-R3.hex
arduino-usbdfu      MEGA-dfu_and_usbserial_combined.hex


From the README.txt

Code: [Select]
Arduino Uno and Mega 2560 Firmwares for the ATmega8U2

This directory contains the firmwares used on the ATmega8U2 on the Arduino
Uno and Arduino Mega 2560.  The arduino-usbdfu directory contains the DFU
bootloader on the 8U2; the arduino-usbserial directory contains the actual
usb to serial firmware.  Both should be compiled against LUFA 100807.  The
two .hex files in this directory combine the dfu and serial firmwares into
a single file to burn onto the 8U2. 

To burn (Uno):
avrdude -p at90usb82 -F -P usb -c avrispmkii -U flash:w:UNO-dfu_and_usbserial_combined.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m

To burn (Mega 2560):
avrdude -p at90usb82 -F -P usb -c avrispmkii -U flash:w:MEGA-dfu_and_usbserial_combined.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m



Did you get it to work?


Go Up