Arduino Mega broken?

Hello there,

First post here, and hope I will be able to help this community as much as I can. For now, I have a very serious problem with my Arduino 2560 rev3.

I was trying to build a sketch for a CMOS Color Camera, and I uploaded one containing multiple infinite loops with many data sent over serial (set to 115200bauds). After a few minutes, Arduino COM port became unavailable. I am used to solve these problems, but this time was different. Since this crash, I was unable to upload any sketch, unable to read serial port (but it is detected by my computer).

Symptoms are:

  • LED "L" undefinilty solid orange directly after power on
  • Maybe no booting sequence because LED "L" does not blink at all
  • Button "RESET" does not do anything (LED "L" remains orange even when I push it, after or during powering on)
  • Connect RESET PIN to GND does not do anything

The upload command output:

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

The command for ship erasing output:

avrdude.exe -p m2560 -C ..\etc\avrdude.conf -c arduino -P com7 -e 
avrdude.exe: stk500_getsync(): not in sync: resp=0x00

I have a project to show at the end of the week and the camera was my final step. Please tell me that you have an alternative to force Arduino Mega to boot...

Thanks a lot!

Regards.
Sam

Reload a sketch that does not blast so much data out:
Press & Hold the reset button, start the IDE download. When you see "Compiled xxx bytes of 256K" or similar message, release the reset button. May take a couple of tries to get the timing right.

Hello,

Already tried that many many times, just to know if I have to try again, is it normal that the LED "L" remains solid orange even if I during I push the reset button?

I think reset button must interrupt all activities, but apparently it does not...

Regards.
Samuel

That LED is driven by an OpAmp and the input may be floating. You can try touching the bottom of the board near pin 13 and see if it causes it to turn off.

Hello,

Nothing happened, trying all what I can, but Arduino still frozen, with "L" LED solid orange and timeout for any command.

I do not have time to order an USB programmer and update the bootloader with it, so I tried to build this: http://arduino.cc/en/Hacking/ParallelProgrammer

But it seems to be for the ATMega8 chip only (I have a 2560 rev 3 so it is ATMega16), do you know an easy way to build a ParallelProgrammer for ATMega16 directly on ICSP?

Thanks a lot for your answers.

Regards.
Sam

Assuming you are on Windows, does the Mega2560 show up on Device Manager? If so then your ATmega16U2 is probably okay.

The symptoms you are describing indicate that the mega2560 bootloader is gone. So you might just need to put back a bootloader to the mega2560 chip. Yes, it will require some kind of ICSP programmer.

If you have another Arduino it would be easier to use ArduinoISP to burn the bootloader to the mega2560.

Hello,

I have an Arduino Uno Rev 3, also tried to do that....

I triple check the connection, I tried on digital pins or directy on the ICSP, here the result :

Without sketch:

avrdude -P com5 -b 19200 -c avrisp -p m2560 -v -e -F -u

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"


         Using Port                    : com5
         Using Programmer              : avrisp
         Overriding Baud Rate          : 19200
         AVR Part                      : ATMEGA2560
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         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  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           eeprom        65    10     8    0 no       4096    8      0  9000  90
00 0x00 0x00
           flash         65    10   256    0 yes    262144  256   1024  4500  45
00 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  90
00 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 0x00

         Programmer 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 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.07s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATMEGA2560 is 1E 98 01
avrdude: erasing chip

avrdude done.  Thank you.

With a sketch:

avrdude -P com5 -b 19200 -c avrisp -p m2560 -v -e -U flash:w:test.cpp.hex -F -u

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"


         Using Port                    : com5
         Using Programmer              : avrisp
         Overriding Baud Rate          : 19200
         AVR Part                      : ATMEGA2560
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         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  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           eeprom        65    10     8    0 no       4096    8      0  9000  90
00 0x00 0x00
           flash         65    10   256    0 yes    262144  256   1024  4500  45
00 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  90
00 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  90
00 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 0x00

         Programmer 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 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.07s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATMEGA2560 is 1E 98 01
avrdude: erasing chip
avrdude: reading input file "test.cpp.hex"
avrdude: input file test.cpp.hex auto detected as Intel Hex
avrdude: writing flash (466 bytes):

Writing | ################################################## | 100% 0.47s

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

Reading | ################################################## | 100% 0.33s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0x0c != 0x00
avrdude: verification error; content mismatch

avrdude done.  Thank you.

I think it is really broken... But I did not do anything except import a sketch with a high baud rate...

Regards.
Samuel

what's Arduino's Own IDE say/do?