Memorial day is 05/25/2015 – Orders will ship out on May 26th. There will not be any deliveries or shipping on Monday. Any order placed after 11am ET on Friday May 22nd will not start to ship out until Tuesday May 26th.

New Mega 2560 - failed to leave programming mode
Moderators: adafruit_support_bill, adafruit

New Mega 2560 - failed to leave programming mode

by gearhead02 on Thu Oct 21, 2010 1:02 pm

Just unwrapped my new mega 2560, loaded the latest arduino IDE v21, selected the Blink sketch, changed the Board to Arudino Mega 2560 and selected the right serial port. When I try downloading the example Blink sketch I get the following errors (and the sketch doesn't run):

avrdude: stk500v2_command(): unknown status 0xc8
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: stk500v2_command(): unknown status 0x01
avrdude: stk500v2_disable(): failed to leave programming mode

I've tried a different USB cable (even though I know this one worked on my printer). I know the IDE is working because I also purchased a nano and I can download the Blink example without any problems. Any help would be appreciated.
Thanks.
gearhead02
 
Posts: 3
Joined: Wed Sep 01, 2010 9:40 am

Re: New Mega 2560 - failed to leave programming mode

by adafruit on Thu Oct 21, 2010 4:34 pm

do any of the LED light up when trying to program?

adafruit
 
Posts: 11905
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: New Mega 2560 - failed to leave programming mode

by gearhead02 on Thu Oct 21, 2010 5:04 pm

The pin 13 LED blinks the 'ON' LED is on, but when programming the TX and RX lights do not flash.
gearhead02
 
Posts: 3
Joined: Wed Sep 01, 2010 9:40 am

Re: New Mega 2560 - failed to leave programming mode

by adafruit on Thu Oct 21, 2010 6:20 pm

hmm we've never seen this error - but lets replace it. please email support@adafruit with a link to this post

adafruit
 
Posts: 11905
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: New Mega 2560 - failed to leave programming mode

by gearhead02 on Fri Oct 22, 2010 8:51 am

Either because I can't give up that easy or because I'm lazy and hate sending things back, I kept looking for a solution. It looks like reinstalling the Mega2560 drivers fixes this problem. You might file it away somewhere in your brain for later. :D

To update driver for Mega 2560 for Vista:
- Download Arduino IDE v21 (unpackage)
- Plug in Mega 2560
- Right-click on 'My Computer' and select properties
- Select 'Device Manager'
- Scroll down to ports
- Find the port the Mega 2560 is connected on and right-click and select properties
- Select 'Update driver'
- Select 'Browse my computer for driver software'
- Browse to the folder where you unpackaged Arduino IDE v21 and select the driver folder
- Press Next

(From here it should find the drivers and install them correctly... if not I'm at a loss, you'll have to find someone smarter)
gearhead02
 
Posts: 3
Joined: Wed Sep 01, 2010 9:40 am

Re: New Mega 2560 - failed to leave programming mode

by adafruit on Fri Oct 22, 2010 11:01 am

faster than shipping you a new one, good work! :)

adafruit
 
Posts: 11905
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: New Mega 2560 - failed to leave programming mode

by tsoltoy on Fri Nov 05, 2010 1:57 pm

I tried all this. It didn't work. At this point I am beyond frustrated with this board. Wasted a good amount of money on this and it's absolutely garbage. Can't even return it to get my money back. If there is a proper solution to this please help out. All it does is says uploading to I/O pins and stays there forever (me being patient waited about 25 minutes) and when I unplug it it says

avrdude: stk500_2_ReceiveMessage(): timeout

I tried what you just suggested on my windows 7 and nothing happened. Same issue.
tsoltoy
 
Posts: 1
Joined: Fri Nov 05, 2010 1:52 pm

Re: New Mega 2560 - failed to leave programming mode

by adafruit on Fri Nov 05, 2010 3:03 pm

tsoltoy, please take a break from working on this so you don't get frustrated. we can help you out or replace it but we've found that its easy to accidentally make a problem worse by being frustrated!

adafruit
 
Posts: 11905
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: New Mega 2560 - failed to leave programming mode

by eric55 on Mon Dec 06, 2010 2:22 am

I am having the same problem, except reinstalling the drivers did not fix my problem. However, I may have another issue as well. This all started after I installed the motor control server (http://www.mathworks.com/academia/ardui ... atlab.html). I have the server uploaded on the arduino and was just messing with the motors through MATLAB. Now, whenever I try and upload any sketch onto the arduino board through the IDE, I get the same error as the poster. The weird thing is I can still talk to the arduino through MATLAB, such as sending values and reading data to the motors. The TX and RX lights light up ONLY when I connect through MATLAB. I can not get them to light up whenever I try and upload a sketch to the board through the Arduino IDE. I have the Arduino Mega 2560.

Thanks in advance
eric55
 
Posts: 6
Joined: Mon Dec 06, 2010 2:14 am

Re: New Mega 2560 - failed to leave programming mode

by adafruit on Mon Dec 06, 2010 1:33 pm

eric, so you had a working mega and then after some motor-hacking it stopped working?

adafruit
 
Posts: 11905
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: New Mega 2560 - failed to leave programming mode

by eric55 on Mon Dec 06, 2010 3:37 pm

Yes that's right. I've been playing with it for a few days now and everything was working fine until I loaded the motor server on there.
eric55
 
Posts: 6
Joined: Mon Dec 06, 2010 2:14 am

Re: New Mega 2560 - failed to leave programming mode

by justwait on Fri Dec 17, 2010 3:52 am

I am having the same problem. It was working 2 weeks ago, now I get cannot leave programming mode. Even the arduino example programs do not work.
justwait
 
Posts: 3
Joined: Fri Dec 17, 2010 3:44 am

Re: New Mega 2560 - failed to leave programming mode

by jamb133 on Fri Dec 17, 2010 6:47 am

Hi,

I have the same issue. Brand new Mega2560, Ubuntu, IDE 0021. The strange is that when I change the speed of serial monitor to 57600, the board is sending "Reset" message continuously, every 4-5 second. The board is alive, the green led is on, but when I try to upload the bare minimum sketch I get this: avrdude STK500_2 RecieveMessage (): Timeout.
The board type and USB port are selected correctly. Recently I see a lot of such issues over many different forums. Please help!

Regards:
Jamb133
jamb133
 
Posts: 4
Joined: Fri Dec 17, 2010 6:33 am

Re: New Mega 2560 - failed to leave programming mode

by adafruit_support_bill on Fri Dec 17, 2010 8:07 am

jamb133 wrote:I have the same issue

justwait wrote:I am having the same problem

There are a few variations of the problem in this thread. Please give us some more detail:
    What do the leds do when you try to download a program?
    Have you tried re-installing the driver?
    What else (if anything) is connected to your mega?

adafruit_support_bill
 
Posts: 37506
Joined: Sat Feb 07, 2009 10:11 am

Re: New Mega 2560 - failed to leave programming mode

by jamb133 on Fri Dec 17, 2010 10:05 am

Hi,

When the uploading starts, then red led blinks few times. The green one is lighting all the time.
No any other hardware connected. Very fresh install of IDE 0021.

Regards:
Jamb133
jamb133
 
Posts: 4
Joined: Fri Dec 17, 2010 6:33 am