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

Re: New Mega 2560 - failed to leave programming mode

by adafruit on Thu Jan 20, 2011 12:09 pm

What Arduino Model is selected in the menu?
are TX and RX led's blinking?
User avatar
adafruit
 
Posts: 11708
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: New Mega 2560 - failed to leave programming mode

by Essah on Tue Mar 29, 2011 7:49 am

I have same problem as previous poster

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


Arduino Mega 2560
Windows 7

Board selected to 2560
Only one COM Port is listed: COM 3
I have tried plugging the USB into all 3 USB ports on my laptop. No change.
also tried downloading the software again and unpacking it. No difference.

With a regular Arduino Duomilanove Atmega 328 it works fine and Windows 7 installs a driver for it automatically, but is unable to do so with the Arduino Mega.
opening device maneger and telling windows to look for driver in the driver folder with the software returns no results either.

the LED next to PWM 13 is off

Help
Essah
 
Posts: 2
Joined: Tue Mar 29, 2011 7:41 am

Re: New Mega 2560 - failed to leave programming mode

by Essah on Fri Apr 29, 2011 2:00 pm

Attempting on a different but similar computer I am able to install the driver without problem but get the same error after trying to upload "blink":
the LED on the board is off, but the TX blinks rapidly while trying to upload, it even says "done uploading"
after a while tx goes to a steady on

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 believe i got the same error before but didn't notice the first bit (didn't scroll up)

setup is the same,
win7 64
arduino IDE 0022

board set to 2560 and the correct COM port selected alright.
Essah
 
Posts: 2
Joined: Tue Mar 29, 2011 7:41 am

Re: New Mega 2560 - failed to leave programming mode

by ralphs18 on Sat Jul 02, 2011 12:46 am

I had the same problem, But I was able to get it to work when I discovered that I was using the wrong COM, I was using Com3 when my Arduino was using COM8. Once I change to the correct COM it work fine. Plug in your Arduino, then go to your device manager and check which COM your Adruino is using and then open your IDE and make sure your setting are set to that COM.
ralphs18
 
Posts: 1
Joined: Sat Jul 02, 2011 12:41 am

Re: New Mega 2560 - failed to leave programming mode

by kj4guu on Wed Nov 30, 2011 11:37 am

Has anyone resolved this issue?
I have the same problem.
using Windows 7 64
was using Arduino 22 without success and now using 23 with same result.

Board Arduino Mega 2560

Several months ago (3 or 4) I played around with the board and loaded a modified blink sketch and it worked fine.
Now when the board is powered up the pwr LED is illuminated and the 13 LED blinks according to the sketch that I last loaded onto the board.
When I attempt to load a new sketch, any sketch I receive the following text.

Binary sketch size: 1588 bytes (of a 258048 byte maximum)
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

during the entire process, nothing about the board shows any indication that it is communicating. The tx/rx leds do not blink, 13 blinks as it was last programed but nothing else.

Nothing about the computer has changed, though I have checked and double checked the drivers and the com ports. I used a different computer with the same results.
Any assistance would help, I have grown attached to this board and I dont really wish to part with it.

Thanks!
kj4guu
 
Posts: 1
Joined: Sat Jun 26, 2010 2:37 am

Re: New Mega 2560 - failed to leave programming mode

by kscharf on Thu Dec 01, 2011 10:57 am

Sometimes when you plug in a USB serial device it can take some time to be discovered. If you open the windows hardware manager and expand the "com ports" or "USB device" sections and plug in your arduino you can see the device being added to the system, when you unplug it you can watch the device disappear. In this way you will discover what com port it is actually on. Windows will usually remember the serial number of the USB device and always assign it the same com port number, Linux will usually reassign the number so that device numbers get reused when they are disconnected. Also you may have to exit the Arduino IDE and re-enter it or the IDE will not discover the new device when it is plugged it, IE: I think it scans for com ports only once so the Arduino must be plugged in before you start the IDE.
User avatar
kscharf
 
Posts: 185
Joined: Wed Sep 10, 2008 10:29 am

Re: New Mega 2560 - failed to leave programming mode

by skyzophreniac on Tue Dec 13, 2011 10:30 am

If I may dig back this topic, it might be usefull for some other people.

The problem indeed comes from the driver (in my case). But reinstalling it might not work for some people. There is another solution that worked for me.

My case:
Official Arduino Mega 2560 out of the box. Never used. No external supply.
Software: arduino 1.0
OS: Windows 7 64
Drivers: manually installed from the arduino software's zip file.
Same error as the previous posts.

The workaround:
I suspected the serial to usb driver to have some troubles. As I use a prolific driver for the same purpose on some other projects which caused me troubles already.
When you install the Arduino driver, it automatically choose the lowest open com port and 'lock' it.
For some unknown reason, the com port it used by default is not 'properly' working on my computer. (which makes no sense as it is a software emulation... but anyway :°)
But I could 'force' the driver to use another port.
To do this: device manager > Ports > Arduino Mega 2560 (COMX) > Right click > Properties > Port Settings > Advanced
There you can force the com port to any other one.

Finally, I can upload my code.

Some hints:
The Arduino software seems to update the com port list each time you click the tools menu and I found that very slow at the beginning.
If I disconnect the board while the software is running with the right parameters, the error is exactly the same, I would expect a 'not connected' error instead.

Best Regards,
Skyz
skyzophreniac
 
Posts: 1
Joined: Tue Dec 13, 2011 10:06 am

Re: New Mega 2560 - failed to leave programming mode

by Ryan on Mars on Wed Jun 20, 2012 6:28 pm

I still have the exact same error as all the previous posters. I tried the last poster's workaround and still nothing. Correct board selected, correct port selected.

Binary sketch size: 2068 bytes (of a 258048 byte maximum)
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


Really don't want to have to send this back.
Ryan on Mars
 
Posts: 1
Joined: Wed Jun 20, 2012 6:25 pm

Re: New Mega 2560 - failed to leave programming mode

by fusa on Fri Sep 07, 2012 7:22 pm

Essah wrote:I have same problem as previous poster

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


Arduino Mega 2560
Windows 7

Board selected to 2560
Only one COM Port is listed: COM 3
I have tried plugging the USB into all 3 USB ports on my laptop. No change.
also tried downloading the software again and unpacking it. No difference.

With a regular Arduino Duomilanove Atmega 328 it works fine and Windows 7 installs a driver for it automatically, but is unable to do so with the Arduino Mega.
opening device maneger and telling windows to look for driver in the driver folder with the software returns no results either.

the LED next to PWM 13 is off

Help


Hi everyone
================================================================================================

I had the same problem. I fixed by uninstalling and reinstalling The driver of the arduino. I thought I had broken my arduino.
You need uninstalling yet.
That's all I hope to help someone.
fusa
 
Posts: 1
Joined: Fri Sep 07, 2012 7:13 pm

Re: New Mega 2560 - failed to leave programming mode

by adafruit_support_bill on Mon Sep 17, 2012 5:50 am

@infoleather - this is your very first post on this forum. If you describe the problem you are having, someone may be able to help.
User avatar
adafruit_support_bill
 
Posts: 30801
Joined: Sat Feb 07, 2009 10:11 am

Re: New Mega 2560 - failed to leave programming mode

by JD3 on Mon Sep 17, 2012 9:14 am

Seems the common problem is Windows 7.
Might be related to a needed update.

After uninstalling software, manually delete file folders.
When re-installing, choose a slightly different name for the file folder.

I had quite a few problems on my Win7 until I updated Java.
None were Arduino related.
That little black caterpillar you just stepped on will set you back a few bucks....
JD3
 
Posts: 101
Joined: Sat Jul 28, 2012 8:01 am

Re: New Mega 2560 - failed to leave programming mode

by RLarsen on Wed Dec 19, 2012 4:49 pm

This is the problem I had on my Windows Vista after buying a new Arduino Mega 2560:

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

First I did as mentioned above:
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 (where your Arduino program is)
- Press Next

It still did not work after doing that alone. But then I did this:

1) Control Panel
Hardware and Sound
Device Manager
2) +Ports
USB Serial Port
Right Click
Properties
3) Port Settings (Tab)
Advanced
4) Switch COM to new number (top)
Ok (Close menu 1)
Ok (Close menu 2)
5) Repeat steps above and change number back to what it was.
6) Select that port when uploading program

Then it worked. :)
RLarsen
 
Posts: 1
Joined: Wed Dec 19, 2012 4:45 pm

Re: New Mega 2560 - failed to leave programming mode

by haniabidi on Fri May 10, 2013 2:31 am

Hi All,

I didn't purchased my arduino mega using adafruit website. But, I was getting the same error. I have used this board for several months, so I knew their wasn't anything wrong with it. I googled the error and found this forum. Since I have solved my problem, I will share what was my problem:

I wasn't selecting the right arduino board and the com settings. My board was by default selecting the existing com part prior to connecting my arduino board. I went to Device Manager. Plugged in my board and made a note of the com part for communication. After that I changed the com settings in arduino. It took a little longer for the first upload. However, it worked.

I have done several uploads after that and now I don't see a latency.

Cheers,
Hani
haniabidi
 
Posts: 1
Joined: Fri May 10, 2013 2:27 am