Go Down

Topic: avrdude error (Read 90004 times) previous topic - next topic


I'm getting the same problem

Code: [Select]

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

My Arduino is built on a bread board and I followed this guide 100%
you tube video -> watch?v=VY0kiJNI5oE

OS: Windows 7
I'm using a USB to Serial adapter.

When I press the reset button, LED @ PIN13 turns on for about 20 seconds then goes off and the setupsits their lifeless. I can provide pictures of the setup if needed.

Thank you in advance.


It all has to do with your COM port which can be accessed (for windows) under Control Panel/systems/hardware/device manager/ports

Excellent answer Jess! That fixed the issue I was having with my Duemilanove.  It was working just fine the stopped for whatever reason. Not sure what caused it. Glad to be up and running again... thought I was going to have to get another chip  ;D /me


I just got a new serial Freeduino V2.0 kit with 328 and put it together.
I have been using the standard Duemilenove and the Mega with the USB interfacing with no problems for a while.
My first upload to my newly assembled serial Freeduino worked also with no problem (through a USB<->RS232 dongle).
However, my subsequent uploads started to consistently show this "protocol error, expect=0x14, resp=0x51" error. No matter which sketches or examples I tried to upload.
I tried a few of the proposed solutions in this thread, but nothing worked.
While playing around, I noticed that when I push the on-board reset button on the same moment that the "Binary sketch size: 7926 bytes (of a 30720 byte maximum)" message comes up in the message window, then my uploads complete with no problem.
No idea what is really going on, but hope that helps.


Feb 04, 2010, 07:03 pm Last Edit: Feb 04, 2010, 07:03 pm by cezary Reason: 1
I just had similar error while writing my own sketch.
The board (Mega), when connected via USB, started with no problem, built-in LED switched on for some time, then started blinking quickly in 3 series, then short TX blink (some 2 unprintable characters, as I checked via PuTTY), and then built-in LED started to blink very fast all the time.

When pressing reset button, built-in LED turned off, but the moment I released the button, it started to blink fast instantly (without 3 series blink).

Sending program to the board failed with the same avrdude error, however since I uploaded my sketch lots of lots of time before, I presumed it wasn't hardware error, but instead had to do with the latest change in sketch I made.

As it turned out, the error was in the code (writing from memory):
Code: [Select]

byte min=255, max=0;
byte *table;
table = (*byte) calloc(max-min, sizeof(byte));

I basicly tried to allocate table of -255 size (I presume calloc returned NULL, but I never checked it), then trying to write/read from table.

The code is obviously bugged, but why it coused inability to upload new sketch is beyond me.

I managed to send new program by disconnecting the board from USB, clicking the "Upload" in Arduino IDE, waiting for awhile for program to compile and connecting the board just before actual upload occured.

Oh, I was using Arduino IDE 0017


I had this error a few times,
once when i was using the serial RX for MIDI recieve and forgot to unplug it (changed MIDI to to serial 1 on mega now)

when i had used a different USB port and the com port had changed from 3 to 4,

when i was programming a different board and forgot to change the board type

when i was using the FTDI +empty sketch on my mega to program a rainbowduino and the board type was still set to mega.

each time just correcting the problem and resetting the arduino worked.


Yikes, so many are struck with the same issue, and yet no sound reasoning has yet to surface as to 'what' is happening.

I have the same issue:   Duemilanove, atmega328, windows vista, correct COM port, good cables, old sketch is still on the chip while new uploads = unsuccessful on platforms arduino 13, 17, + 18.

My suspect = windows (but that's usually who I blame for any malfunction)...

I've played the game of "Try pushing reset NOW" about 50 times with no progress...


Moved to Win XP - Same problem. I'm going to try and re-burn the bootloader by making a quick CISP to parallel adaptor tonight...last option is to buy a new chip :0/


Feb 24, 2010, 07:28 pm Last Edit: Feb 24, 2010, 07:49 pm by dwyer2bp Reason: 1
Made the paralell programmer, still doesn't work. However, I get this error with the paralell programmer/burning the bootloader:

Code: [Select]

avrdude: initialization failed, rc=-1
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
avrdude: AVR device not responding
avrdude: verification error, first mismatch at byte 0x0000
        0x00 != 0x07
avrdude: verification error; content mismatch

Arduino environment is on the correct setting for my board:
Duemilinove with atmega328)

Here is what the communication looks like using Portmon for the actual upload process that ends up in the "not in sync" error message.

Code: [Select]

0.00000447      javaw.exe      IOCTL_SERIAL_SET_QUEUE_SIZE      VCP0      SUCCESS      InSize: 2048 OutSize: 1024      
0.00074702      javaw.exe      IOCTL_SERIAL_SET_BAUD_RATE      VCP0      SUCCESS      Rate: 9600      
0.00098337      javaw.exe      IOCTL_SERIAL_SET_LINE_CONTROL      VCP0      SUCCESS      StopBits: 1 Parity: NONE WordLength: 8      
0.00000223      javaw.exe      IOCTL_SERIAL_SET_CHAR      VCP0      SUCCESS      EOF:4 ERR:0 BRK:0 EVT:a XON:0 XOFF:0      
0.00197427      javaw.exe      IOCTL_SERIAL_SET_HANDFLOW      VCP0      SUCCESS      Shake:1 Replace:0 XonLimit:0 XoffLimit:0      
0.00000251      javaw.exe      IOCTL_SERIAL_SET_TIMEOUTS      VCP0      SUCCESS      RI:0 RM:0 RC:0 WM:0 WC:0      
0.00081184      javaw.exe      IOCTL_SERIAL_SET_BAUD_RATE      VCP0      SUCCESS      Rate: 9600      
0.00100516      javaw.exe      IOCTL_SERIAL_SET_LINE_CONTROL      VCP0      SUCCESS      StopBits: 1 Parity: NONE WordLength: 8      
0.00000251      javaw.exe      IOCTL_SERIAL_SET_CHAR      VCP0      SUCCESS      EOF:4 ERR:0 BRK:0 EVT:a XON:0 XOFF:0      
0.00095906      javaw.exe      IOCTL_SERIAL_SET_HANDFLOW      VCP0      SUCCESS      Shake:1 Replace:0 XonLimit:0 XoffLimit:0      
0.00000223      javaw.exe      IOCTL_SERIAL_SET_TIMEOUTS      VCP0      SUCCESS      RI:-1 RM:0 RC:0 WM:0 WC:0      
0.00111187      javaw.exe      IOCTL_SERIAL_SET_BAUD_RATE      VCP0      SUCCESS      Rate: 9600      
0.00098672      javaw.exe      IOCTL_SERIAL_SET_LINE_CONTROL      VCP0      SUCCESS      StopBits: 1 Parity: NONE WordLength: 8      
0.00000279      javaw.exe      IOCTL_SERIAL_SET_CHAR      VCP0      SUCCESS      EOF:4 ERR:0 BRK:0 EVT:a XON:0 XOFF:0      
0.00097443      javaw.exe      IOCTL_SERIAL_SET_HANDFLOW      VCP0      SUCCESS      Shake:1 Replace:0 XonLimit:0 XoffLimit:0      
0.00000251      javaw.exe      IOCTL_SERIAL_SET_TIMEOUTS      VCP0      SUCCESS      RI:-1 RM:0 RC:0 WM:0 WC:0      
0.00084173      javaw.exe      IOCTL_SERIAL_SET_WAIT_MASK      VCP0      SUCCESS      Mask: RXCHAR       
0.02545491      avrdude.exe      IRP_MJ_CREATE      VCP0      SUCCESS      Options: Open       
0.00000419      avrdude.exe      IOCTL_SERIAL_SET_QUEUE_SIZE      VCP0      SUCCESS      InSize: 1024 OutSize: 1024      
0.00000223      avrdude.exe      IOCTL_SERIAL_GET_BAUD_RATE      VCP0      SUCCESS            
0.00000251      avrdude.exe      IOCTL_SERIAL_GET_LINE_CONTROL      VCP0      SUCCESS            
0.00000251      avrdude.exe      IOCTL_SERIAL_GET_CHARS      VCP0      SUCCESS            
0.00000251      avrdude.exe      IOCTL_SERIAL_GET_HANDFLOW      VCP0      SUCCESS            
0.00088168      avrdude.exe      IOCTL_SERIAL_SET_BAUD_RATE      VCP0      SUCCESS      Rate: 19200      
0.00098420      avrdude.exe      IOCTL_SERIAL_CLR_RTS      VCP0      SUCCESS            
0.00098839      avrdude.exe      IOCTL_SERIAL_CLR_DTR      VCP0      SUCCESS            
0.00098728      avrdude.exe      IOCTL_SERIAL_SET_LINE_CONTROL      VCP0      SUCCESS      StopBits: 1 Parity: NONE WordLength: 8      
0.00000223      avrdude.exe      IOCTL_SERIAL_SET_CHAR      VCP0      SUCCESS      EOF:0 ERR:0 BRK:0 EVT:0 XON:0 XOFF:0      
0.00197344      avrdude.exe      IOCTL_SERIAL_SET_HANDFLOW      VCP0      SUCCESS      Shake:0 Replace:0 XonLimit:0 XoffLimit:0      
0.00000251      avrdude.exe      IOCTL_SERIAL_SET_TIMEOUTS      VCP0      SUCCESS      RI:0 RM:0 RC:0 WM:0 WC:0      
0.00097415      avrdude.exe      IOCTL_SERIAL_SET_DTR      VCP0      SUCCESS            
0.00000223      avrdude.exe      IOCTL_SERIAL_SET_TIMEOUTS      VCP0      SUCCESS      RI:250 RM:250 RC:250 WM:0 WC:0      
0.49972469      avrdude.exe      IRP_MJ_READ      VCP0      TIMEOUT      Length 0:       
0.00000475      avrdude.exe      IOCTL_SERIAL_SET_TIMEOUTS      VCP0      SUCCESS      RI:500 RM:500 RC:500 WM:0 WC:0      
0.00017796      avrdude.exe      IRP_MJ_WRITE      VCP0      SUCCESS      Length 2: 30 20       
0.00000223      avrdude.exe      IOCTL_SERIAL_SET_TIMEOUTS      VCP0      SUCCESS      RI:250 RM:250 RC:250 WM:0 WC:0      
0.49973363      avrdude.exe      IRP_MJ_READ      VCP0      TIMEOUT      Length 0:       
0.00000447      avrdude.exe      IOCTL_SERIAL_SET_TIMEOUTS      VCP0      SUCCESS      RI:500 RM:500 RC:500 WM:0 WC:0      
0.00017544      avrdude.exe      IRP_MJ_WRITE      VCP0      SUCCESS      Length 2: 30 20       
0.00000251      avrdude.exe      IOCTL_SERIAL_SET_TIMEOUTS      VCP0      SUCCESS      RI:250 RM:250 RC:250 WM:0 WC:0      
0.49973865      avrdude.exe      IRP_MJ_READ      VCP0      TIMEOUT      Length 0:       
0.00000475      avrdude.exe      IOCTL_SERIAL_SET_TIMEOUTS      VCP0      SUCCESS      RI:500 RM:500 RC:500 WM:0 WC:0      
0.00016566      avrdude.exe      IRP_MJ_WRITE      VCP0      SUCCESS      Length 2: 30 20       
0.00000251      avrdude.exe      IOCTL_SERIAL_SET_TIMEOUTS      VCP0      SUCCESS      RI:5000 RM:5000 RC:5000 WM:0 WC:0      
9.99989217      avrdude.exe      IRP_MJ_READ      VCP0      TIMEOUT      Length 0:       
0.00000447      avrdude.exe      IOCTL_SERIAL_SET_TIMEOUTS      VCP0      SUCCESS      RI:250 RM:250 RC:250 WM:0 WC:0      
0.49991717      avrdude.exe      IRP_MJ_READ      VCP0      TIMEOUT      Length 0:       
0.00000559      avrdude.exe      IOCTL_SERIAL_SET_TIMEOUTS      VCP0      SUCCESS      RI:500 RM:500 RC:500 WM:0 WC:0      
0.00101605      avrdude.exe      IRP_MJ_WRITE      VCP0      SUCCESS      Length 2: 51 20       
0.00000251      avrdude.exe      IOCTL_SERIAL_SET_TIMEOUTS      VCP0      SUCCESS      RI:5000 RM:5000 RC:5000 WM:0 WC:0      
10.00001425      avrdude.exe      IRP_MJ_READ      VCP0      TIMEOUT      Length 0:       
0.00000475      avrdude.exe      IRP_MJ_CLEANUP      VCP0      SUCCESS            
0.11713723      avrdude.exe      IRP_MJ_CLOSE      VCP0      SUCCESS            

There seems to be a "TIMEOUT" whenever the PC tries to read from the COM port...

just placed an order for a new chip


What I'm using
-Arduino Duemilanove
-Windows 7/Vista
-IDE 0018
-The most up to date Usb serial drivers available from FTDI
-6ft USB cable

Problems I'm experiencing:

-I was only ever able to upload the blink sketch to the board once, it would blink 4 times and then wait about a second then retsart. I found this very odd.
-When I tried to upload the same sketch again, It threw the following error:
           avrdude: stk500_getsync(): not in sync: resp=0x00
           avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

Things I've tried
-reinstalling the ftdi drivers
-every possible combination of baud rates
-pressing the reset button immediately after the program compiles while uploading
-installing a new chip with a verified correct bootloader(installed in the correcy orientation)
-pulling the chip to and putting a jumper between pins 0 and 1 to check to see if serial works, It was verified to work
-Verified that the correct board is selected in the IDE

I'm completely stuck on what's wrong with this board, any ideas of what I should try short of buying a new one?


With regard to failing to upload a sketch, I have had this problem many, many times. I found the best answer with my kit is to hold the reset button down, click the upload arrow in the ide, then release the reset button immediately. The timing of all this is fairly critical but it works almost every time.  It is worth trying to see if it works for anybody else.


What I'm using
-Seeeduino 2.12 (ATmega168)
-Windows 7
-IDE 0018
-The most up to date Usb serial drivers available from FTDI

Problems I was experiencing:
I also was able to upload only one sketch (s65shield demo one, watterott.net/projects/s65-shield) when I ran into the wellknown error

          avrdude: stk500_getsync(): not in sync: resp=0x00
          avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

My solution:

I tried several things found in this thread including reinstalling drivers, changing serials ports, pressing resetbutton and so on.
Finally it worked by just switching the seeeduino switch for autoreset from manual to automatic.
Yes, I know that the original arduino does not have this auto-reset-feature, but I thought it could perhaps help someone solving the problem.


Just got the new atmega328 in the mail (sparkfun, you are quick!).  replaced the chip and everything is A-O-K. Something about my old chip must of zorched...glad it wasn't TOO expensive (darn shipping).



I need Your help :/ I have a problem with avrdude too:

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I have received the Arduino Mega just a few days ago and after about 10 uploads of example programs and their modifications I can't do anything any more...

My OS: Windows 7 (two different computers)
My IDE: Arduino 0018

The full error:


Binary sketch size: 1426 bytes (of a 126976 byte maximum)
xxx\arduino-0018\hardware/tools/avr/bin/avrdude -Cxxx\arduino-0018\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega1280 -cstk500v1 -P\\.\COM4 -b57600 -D -Uflash:w:xxx\Temp\build6465638270115722352.tmp\Blink.cpp.hex:i

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
        Copyright (c) 2000-2005 Brian Dean,

        System wide configuration file is "xxx\arduino-0018\hardware/tools/avr/etc/avrdude.conf"

        Using Port            : \\.\COM4
        Using Programmer      : stk500v1
        Overriding Baud Rate  : 57600
avrdude: ser_open(): setting dtr
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: Send: Q [51]   [20]
avrdude: Recv:
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

avrdude done.  Thank you.

Port selected correctly, board selected: Arduino Mega.
I have tried all http://arduino.cc/en/Guide/Troubleshooting advices.

HELP  :'(



Mar 05, 2010, 04:56 pm Last Edit: Mar 05, 2010, 04:58 pm by mlvj@yahoo.co.uk Reason: 1
Hi, I have an Arduino Duemilanove, bought a month or two ago.

I've just started getting this error when uploading sketches:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I have previously successfully loaded sketches to this Arduino (my only one), from this PC.

Since it last worked (which was with an Ethernet shield connected), I have left it on my desk. Today I disconnected the Ethernet shield, and got the issue straight away.

I have tried using a different (winxp) PC with a fresh installation of Arduino18, same issue.

The com port appears to be correct (it is set to COM1). I have followed all the suggestions in the troubleshooting section.

After I got the issue, I removed the microcontroller chip, and plugged in the Libelium GSM shield (following instructions on their web site) and I was able to talk to the GSM shield (I did some USSD commands).

I removed the GSM shield again and plugged in the controller (with the semicircular notch next to the picture of it, so I think it is the correct way around).

With the USB cable plugged in, the PWR led is lit, permanently. It doesn't change, when I press the S1 button, nothing happens. When I plug in a LED between digital pin 13 and GND, it does not light, ever.

When using the Libelium GSM shield, I have been using a 4A 12V power supply connected to the Arduino.

When doing an upload, the RX light flickers three times briefly, then once briefly, then no more.

What else can I check, and what could be the issue? Is it possible my microcontroller is broken? Can I get another one?

Thank you very much for any and all help!

Martin (but a different Martin than the one directly above!)


Hi All,

I recently purchased an Arduino Nano v3.0 and experienced the following upload problem:

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

I thought I might share my results in the hopes that my information may help else someone down the line.

Final Problem
In my situation the TX1 pin was shorted to ground through a hairline solder whisker.

1. Microsoft Windows Version 6.0 [Vista] Build 6002: Service Pack 2
2. Arduino v0018
3. Arduino Nano v3.0 [gravitech.us]
4. FTDI USB Driver [Driver Date = 10/22/2009] [Driver Version =]

USB Connection Settings:
Control Panel --> System --> Device Manager --> Ports -- > Right Click on USB Serial Port

Port Settings tab
Bits Per Second: 57,600
Data bits: 8
Parity: None
Stop bits: 1
Flow Control: None

Under ArbitraryArduinoFolderLocation\hardware\arduino\boards.txt
this parameter should match your baudrate: atmega328.upload.speed=57600

IDE Settings
In the Arduino IDE make sure you select your board - in my case:
Tools-->Board-->Arduino Duemilanove or Nano w/ATmega328

Make sure you have the correct serial port selected under
Tools-->Serial Port

I'm not sure about the other Arduino Boards, but the Nano has a TX and RX LED. Both of these lights should flicker when you first connect the USB cable to the board and also when you upload a program.

If you don't see both of these lights flicker you may have your port blocked or the USB Driver incorrectly set.

Hope this helps!

Go Up