Go Down

Topic: Arduino Mega 2560 R3 DFU Mode Help (Read 20044 times) previous topic - next topic

jbrannic

Hi,

I have the arduino mega 2560 r3 and am trying to put it into DFU Mode. I am following these instructions but have hit a wall.

http://flipmu.com/work/chronome/changing-the-serial-number/

When I reach step 12 where you short the red and green, the arduino serial port disappears from the arduino application like its supposed to. But, as soon as I remove the short it reappears.

I am looking for any help I can get. Thanks.

Justin

eried

The first short is for the reset, then is for the DFU. You have to be quick, I used a flat screw driver. Just try again, reset the boards and short the other pins. It is a bit tricky
My website: http://ried.cl

jbrannic

I have tried multiple times. Is there something that I am forgetting or some tip/trick to doing it?

jbrannic

Does anyone else have any recommendations. I am still stuck on this and have tried multiple times to get this to work.

jbrannic

Do I need to be quick making the 2nd short?

spcomputing


Do I need to be quick making the 2nd short?


One short will suffice.  Think of it like tapping a reset button.  This should start the New Device installation wizard where you need to go to the FLIP folder to point to the Atmega16u2 driver.  In you Device Manager, after you reset the 16u2, which device comes back?

hiduino

The original instructions don't apply to your Mega 2560 R3 version.  Forget about the green short in step 12.  All you need to short are the two pins on the ICSP header nearest the USB connector (same as the red short in that step).


sracer

I have the same problem with Mega 2560 R3. I have tried grounding the Reset pin quickly, as well as held for 10 seconds, it always disappear and reappear as COM device. DFU mode never showed up. I have googled around for a whole day and found no solution. Really need help.

sracer

I took some pictures of my board, can you see anything missing? There has to be some way to enter DFU mode, right?

sracer

I found out my board had only usbserial firmware. I'll see how to burn the combined one without DFU mode.

sracer

I made it. For unknown reasons my fresh mega 2560 r3 had only usbserial firmware loaded in Atmega16u2. So all I need to do is burn the big combined firmware. Here is how.

I used a parallel programmer and Windows OS. your may need to change some operations according to your hardware and software.

1. Prepare a avr programmer. I used a parallel programmer. Check this link to make yours.http://www.arduino.cc/en/Hacking/ParallelProgrammer

2. Prepare a PC with parallel port. Power off if turned on.

3. Connect the programmer to the 6-pin ICSP near the USB connector (only 5 pins are to be used here). connect the parallel port to PC.

4. Turn on your PC. The "on" and "L" LEDs on Arduino should dimly lit. Connect Arduino using the USB cord.

5. Now the PC OS is on, copy some files for latter convenience. Change "<arduino>"s to your arduino root directory.

    "<arduino>\hardware\tools\avr\etc\avrdude.conf" to  "<arduino>\hardware\tools\avr\bin\"

    "<arduino>\hardware\arduino\firmwares\atmegaxxu2\Arduino-COMBINED-dfu-usbserial-atmega16u2-Mega2560-Rev3.hex" to "<arduino>\hardware\tools\avr\bin\", rename it to a.hex

6. Open command line, change current directiory to <arduino>\hardware\tools\avr\bin\

    cd "<arduino>\hardware\tools\avr\bin\"

7. type this command and wait, it should be fast.

    avrdude -p m16u2 -c dapa -U flash:w:a.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m

8. If successful, you get messages like the following, otherwise your programmer may not be working well. If you are using a parallel programmer, you may need shorter, or higher quality wires.

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9489
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed

         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "a.hex"
avrdude: input file a.hex auto detected as Intel Hex
avrdude: writing flash (15668 bytes):

Writing | ################################################## | 100% 5.18s

avrdude: 15668 bytes of flash written
avrdude: verifying flash memory against a.hex:
avrdude: load data flash data from input file a.hex:
avrdude: input file a.hex auto detected as Intel Hex
avrdude: input file a.hex contains 15668 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 4.58s

avrdude: verifying ...
avrdude: 15668 bytes of flash verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0xD9"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xD9:
avrdude: load data hfuse data from input file 0xD9:
avrdude: input file 0xD9 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xF4"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xF4:
avrdude: load data efuse data from input file 0xF4:
avrdude: input file 0xF4 contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0x0F"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0F:
avrdude: load data lock data from input file 0x0F:
avrdude: input file 0x0F contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

9. Now with a swift bridge of the Reset and GND pins, you get DFU mode.

Here is the picture of the stuff I used.

mccartes

I got this to work for the following configuration: The above description gave me errors. 

Programmer: Sparkfun Pocket AVR Programmer
     Power supply on (switch), note the the LED on the Arduino board come on either way with this switch.. which is odd 
ATMEGA2560: Sainsmart, with ATMEGA8u2
The 6 pin cable is hooked up so that the cable exits the connector away from the board.

I created a Batch file to run the AVRDUDE program so that I did not make a mistake:   Placed it in the suggested location:
arduino-1.0.4\hardware\tools\avr\bin   
To make the .bat file I made a text file and re-named it to .bat.  Perhaps there is a better way, but that was easy.
The BAT file has just one line..

Instead of renaming the file as above to a.hex, I just used the full name of the hex file.. it is the combined file from the Arduino directory. MEGA-dfu_and_usbserial_combined.hex
from: arduino-1.0.4\hardware\arduino\firmwares\atmegaxxu2
Copy this file into the \bin directory.

Here is the command that worked. 
avrdude -p at90usb82 -F -c usbtiny -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

Note that it is a little different from what was above or int he readme.txt file here:
arduino-1.0.4\hardware\arduino\firmwares\atmegaxxu2

Afterwards I loaded the Blink example on my board and it worked fine.

Krantz

I cannot put my Mega into DFU mode either - one curious thing, though -- the chip is extremely hot within 1 minute after connecting it to the computer.

Does this mean the Mega is dead?

asdkkk

Hi, I can't put my arduino mega into DFU mode.  Someone has told me that the chip which interprets serial data from the USB port has likely been damaged and will need to be reflashed.  How would I go about this? Thanks !

Go Up