Old MEGA2560 (ORIGINAL) locking up computer/USB

I must've knocked something wonky on my Original/Genuine MEGA2560.. Awhile back, it stopped working, and I was able to get the bootloader reprogrammed, using a UNO as the ISP.. But, Now it's really gumming up the works! When I connect it to either my Linux desk machine, or a Windows-8 laptop, it interferes with the mouse or trackpad. Is it possible to gfo the same way, reburning the firmware to the ATMEGA8U2, using the same Arduino as ISP method? If yes,
(a) where can I find the firmware
(b) can it be done with the UNO/R2 like I did the bootloader?
(c) Bear with me, Step By Step would be nice.. Otherwise, I've got me a brick!

Would prefer using the Linux machine, as the Win-8.1 machine seems to be getting bogged down (Seriously suspecting the Win-10 Upgrade software not helping matters constantly running in background.)

Thanks, Stephen (gelfling6)

Yes, the 8U2 shouldn't be a problem upgrade by the same Arduino as ISP technique. There is 2nd ISP connector on the board for the 8U2.
(a) Firmware is a part of Arduino SW.
(b) Yes, but can differ little bit. Probably would be better to use the avrdude directly from command line.
(c) Since it requires more time, maybe somebody else.
Are you really sure you need to re-burn FW in the 8U2? Maybe the flash fades out by the years and it could help, just thinking but first, try the loopback test. Here on the forum is a guide.

Well, Here I am, almost a month later, and still (a) no progress, (b) no-one stepping in to help.
:frowning: I'm on a limited budget (as in ZERO) and all I have available are the UNO R2, to use as an Arduino-ISP. How do I go about this? I don't want to toss this 2560 as a Brick... :frowning: :frowning: :frowning:

These two commands should do it. You will need to 'cd' to the hardware directory for your Arduino installation. You will also need to set the "-c" parameter for the type of ISP device you have.

cd "C:/Program Files (x86)/arduino-1.6.9/hardware/"

tools/avr/bin/avrdude -p at90usb82 -F -P usb -c avrispmkii -U flash:w:arduino/firmwares/atmegaxxu2/arduino-usbdfu/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

johnwasser:
These two commands should do it. You will need to 'cd' to the hardware directory for your Arduino installation. You will also need to set the "-c" parameter for the type of ISP device you have.

cd "C:/Program Files (x86)/arduino-1.6.9/hardware/"

tools/avr/bin/avrdude -p at90usb82 -F -P usb -c avrispmkii -U flash:w:arduino/firmwares/atmegaxxu2/arduino-usbdfu/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

Well, about to give it a shot.. waiting for my Windows-8 laptop to power-up.. just had to replace the WiFi card on my desktop, which has been down a few days. (running UBUNTU Linux, Also has the 1.6.9 IDE running. But since this is under Windows, it's gonna have to do.)..

And.... Spotted one minor error in the instruction.. discard the /arduino-usbdfu/, go straight to MEGA.. But..... Got the following error....

avrdude: Version 6.0.1, compiled on Apr 14 2015 at 19:04:16
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "/home/jenkins/jenkins/jobs/toolchain-avr-linux64/workspace/objdir/etc/avrdude.conf"
avrdude: can't open config file "/home/jenkins/jenkins/jobs/toolchain-avr-linux64/workspace/objdir/etc/avrdude.conf": No such file or directory
avrdude: error reading system wide configuration file "/home/jenkins/jenkins/jobs/toolchain-avr-linux64/workspace/objdir/etc/avrdude.conf"

Ah! Progress, yes, working... no.. there is no /home/jenkins.. there is /usr/gelfling6/, but not pointing to the right directory it seems.

Suggestion?

Add "-Ctools/avr/etc/avrdude.conf" to your command to use the Arduino system-wide configuration file.

Okay, some more progress, still stalled..

Using the following command...

tools/avr/bin/avrdude -C tools/avr/etc/avrdude.conf -p at90usb82 -F -P /dev/ttyACM0 -c arduino -U flash:w:arduino/firmwares/atmegaxxu2/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

assigning to device ttyACM0 (the port for the Clone-MEGA) and using arduino as the isp programmer...

And I'm getting...

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
....
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done.  Thank you.

Tried changing programmer to "avrisp", the Error light (Clone pin 8) comes on,I only get "avrdude: stk500v2_ReceiveMessage(): timeout",
changing it to "avrisp", I get...

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe0
.... (Attempt 4 same response)
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
.... (attempts 7&8, same as 9)
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe0
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe0

avrdude done.  Thank you.

So..... Some progress... This is using a XRDuino MEGA2650-R3, as the ISP, the 1.6.9 IDE bootloader ArduinoISP program, Heartbeat LED as 9, Error LED as 8, Program LED as 7, Slave reset - 53(S) to pin 5(D), MOSI - 51(S) to pin 4(D), MISO - 50(S) to Pin 1(D), SCK - 52(S) to Pin 6(D)
power from 3.3V to pin 2(D) & GND to pin 6(D) (S=Source (the clone) D=Destination (the crashed MEGA)

Wait, I think I finally got a response!

tools/avr/bin/avrdude -C tools/avr/etc/avrdude.conf -p at90usb82 -F -P /dev/ttyACM0 -c avrispmkii -U flash:w:arduino/avr/firmwares/atmegaxxu2/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

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9801
avrdude: Expected signature for AT90USB82 is 1E 93 82
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 "arduino/avr/firmwares/atmegaxxu2/MEGA-dfu_and_usbserial_combined.hex"
avrdude: input file arduino/avr/firmwares/atmegaxxu2/MEGA-dfu_and_usbserial_combined.hex auto detected as Intel Hex
avrdude: writing flash (7452 bytes):

Writing | ################################################## | 100% 1.69s

avrdude: 7452 bytes of flash written
avrdude: verifying flash memory against arduino/avr/firmwares/atmegaxxu2/MEGA-dfu_and_usbserial_combined.hex:
avrdude: load data flash data from input file arduino/avr/firmwares/atmegaxxu2/MEGA-dfu_and_usbserial_combined.hex:
avrdude: input file arduino/avr/firmwares/atmegaxxu2/MEGA-dfu_and_usbserial_combined.hex auto detected as Intel Hex
avrdude: input file arduino/avr/firmwares/atmegaxxu2/MEGA-dfu_and_usbserial_combined.hex contains 7452 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.21s

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

Writing |                                                    | 0% 0.00s ***failed;  
Writing | ################################################## | 100% 0.09s

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: verification error, first mismatch at byte 0x0000
         0x00 != 0xff
avrdude: verification error; content mismatch

avrdude: safemode: lfuse changed! Was ff, and is now 0
Would you like this fuse to be changed back? [y/n] y

But, it simply locks into a repeated :

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout

I've got a bad feeling, the 8u2 may well be bricked...

Thanks for the help, though! I made a lot more progress with you, but this may well be a cooked chip

avrdude: verification error, first mismatch at byte 0x0000
         0x00 != 0xff

This often means that you didn't disable the auto-reset on the Arduino you are using as an ISP. When the ISP Arduino resets, the PC starts talking to the Arduino's bootloader instead of the ArduinoISP sketch. The bootloader is happy to acknowledge the command to write a fuse byte but when asked to read it back will always reply '00'.

Put a (roughly) 10uf capacitor between the Reset (+) and Ground (-) pins after uploading the ArduinoISP sketch. This will absorb the reset pulse.