Hello everyone, I've got a problem with my Mega2560 rev3
If i try to upload a sketch with the normal usb cable it fails every time, but using another arduino as ISP or even as serial with a manual reset it works.
I've tried to check the atmega16u2 with an Arduino as ISP and avrdude, trying also to reset the fuses values, but every time I get the following message:
icearrow@netbook:~$ avrdude -b 19200 -c avrisp -p usb162 -v -P /dev/ttyUSB0 -F -U lfuse:w:0xEF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0xCF:m -F
avrdude: Version 5.10, compiled on Mar 23 2010 at 15:03:00
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg WunschSystem wide configuration file is "/etc/avrdude.conf"
User configuration file is "/home/icearrow/.avrduderc"
User configuration file does not exist or is not a regular file, skippingUsing Port : /dev/ttyUSB0
Using Programmer : avrisp
Overriding Baud Rate : 19200
AVR Part : AT90USB162
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC6
RESET disposition : possible i/o
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
eeprom 65 20 4 0 no 512 4 128 9000 9000 0x00 0x00
flash 65 6 128 0 yes 16384 128 128 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00Programmer Type : STK500
Description : Atmel AVR ISP
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 usavrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.06s
avrdude: Device signature = 0xffffff
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for AT90USB162 is 1E 94 82
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as FF
avrdude: safemode: efuse reads as FF
avrdude: reading input file "0xEF"
avrdude: writing lfuse (1 bytes):Writing | | 0% 0.00s ***failed;
Writing | ################################################## | 100% 0.16savrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xEF:
avrdude: load data lfuse data from input file 0xEF:
avrdude: input file 0xEF contains 1 bytes
avrdude: reading on-chip lfuse data:Reading | ################################################## | 100% 0.02s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0xef != 0xff
avrdude: verification error; content mismatchavrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as FF
avrdude: safemode: efuse reads as FF
avrdude: safemode: lfuse changed! Was ef, and is now ff
Would you like this fuse to be changed back? [y/n]
icearrow@netbook:~$
and if I press Y at the question it hangs until i terminate the program.
If I check the atmega2560 everything seems OK, with the right device signature.
What can I do?