New Mega 2560 - failed to leave programming mode

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Essah
 
Posts: 2
Joined: Tue Mar 29, 2011 7:41 am

Re: New Mega 2560 - failed to leave programming mode

Post by Essah »

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

Post by Essah »

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.

ralphs18
 
Posts: 1
Joined: Sat Jul 02, 2011 12:41 am

Re: New Mega 2560 - failed to leave programming mode

Post by ralphs18 »

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.

User avatar
kj4guu
 
Posts: 1
Joined: Sat Jun 26, 2010 2:37 am

Re: New Mega 2560 - failed to leave programming mode

Post by kj4guu »

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!

User avatar
kscharf
 
Posts: 277
Joined: Wed Sep 10, 2008 10:29 am

Re: New Mega 2560 - failed to leave programming mode

Post by kscharf »

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.

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

Re: New Mega 2560 - failed to leave programming mode

Post by skyzophreniac »

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

User avatar
ryan on mars
 
Posts: 1
Joined: Wed Jun 20, 2012 6:25 pm

Re: New Mega 2560 - failed to leave programming mode

Post by ryan on mars »

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.

fusa
 
Posts: 1
Joined: Fri Sep 07, 2012 7:13 pm

Re: New Mega 2560 - failed to leave programming mode

Post by fusa »

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.

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: New Mega 2560 - failed to leave programming mode

Post by adafruit_support_bill »

@BANNED - this is your very first post on this forum. If you describe the problem you are having, someone may be able to help.

JD3
 
Posts: 101
Joined: Sat Jul 28, 2012 8:01 am

Re: New Mega 2560 - failed to leave programming mode

Post by JD3 »

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.

RLarsen
 
Posts: 1
Joined: Wed Dec 19, 2012 4:45 pm

Re: New Mega 2560 - failed to leave programming mode

Post by RLarsen »

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. :)

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

Re: New Mega 2560 - failed to leave programming mode

Post by haniabidi »

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

User avatar
purnak
 
Posts: 2
Joined: Mon Aug 03, 2015 9:12 am

Re: New Mega 2560 - failed to leave programming mode

Post by purnak »

Sir,

We are using Arduino Mega 2560.

User avatar
sahanesandip
 
Posts: 1
Joined: Wed Feb 22, 2017 2:19 am

Re: New Mega 2560 - failed to leave programming mode

Post by sahanesandip »

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 capacitive sensor I get the following errors (and the sketch doesn't run):
avrdude: stk500v2_command(): unknown status 0x01
avrdude: stk500v2_disable(): failed to leave programming mode
An error occurred while uploading the sketch

User avatar
T2p2
 
Posts: 2
Joined: Mon Apr 16, 2018 8:00 pm

Re: New Mega 2560 - failed to leave programming mode

Post by T2p2 »

Hello everyone.
I have the same issues.

I have tried several 2560s (4), 3 Unos , several USB cables for both models.
The old 2560 and Uno were both working ok the last time I used them late last year.

I downloaded the new IDE software and that , I believe, is when my troubles started.
I am using an XP.

I hope the fix is not simply giving a replacement unit. As I have indicated earlier, I did that several times with the 2560s and Unos.

I will be watching this thread. I hope somebody will figure out what is going on.

T2p2

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”