85

I made an awesome program the other day, and I wanted to upload it to my Arduino. After clicking the upload button, some mean dude named avr came along and stopped me, saying:

avrdude: stk500_getsync(): not in sync: resp=0x00

All I want to do is just upload my program, but avr won't let me. He's even unintelligible, so can someone tell me what the heck he's trying to say and how to get rid of him?


i.e.:

Whenever I try to upload a program to my Arduino, I get this error message:

avrdude: stk500_getsync(): not in sync: resp=0x00

What does this mean, and how can I fix it?

  • 4
    Pretty common error message, not always trivial to solve: electronics.stackexchange.com/… – jippie Feb 12 '14 at 6:47
  • 11
    Nice title! I've had that error myself... – TheDoctor Feb 12 '14 at 22:46
  • 6
    +1 for the title :D... I really hate this dude as much as you did! – DRS David Soft Mar 6 '15 at 1:52
  • Try installing the driver (cp2102)for the arduino. That did help me out. Thanks for the previous answers ppl :-) – user10926 Jun 30 '15 at 18:21
  • This June 2018 post solved it for me (1st answer): arduino.stackexchange.com/questions/51729/… – Michael Sims Jun 21 '18 at 0:58

19 Answers 19

54

This is caused by a generic connection error between your computer and the Arduino, and can result from many different specific problems.

Here are some easy things that can often fix this error:

  • Disconnect and reconnect the USB cable.
  • Press the reset button on the board.
  • Restart the Arduino IDE.
  • Make sure you select the right board in Tools ► Board ►, e.g. If you are using the Duemilanove 328, select that instead of Duemilanove 128. The board should say what version it is on the microchip.
  • Make sure you selected the right port in Tools ► Serial Port ►. One way to figure out which port it is on is by following these steps:
    1. Disconnect the USB cable.
    2. Go to Tools ► Serial Port ► and see which ports are listed (e.g. COM4 COM5 COM14).
    3. Reconnect the USB cable.
    4. Go back to Tools ► Serial Port ►, and see which port appeared that wasn't there before.
  • Make sure digital pins 0 and 1 do not have any parts connected, including any shields.

If none of those work, you will want to try to isolate the issue by replacing things: try a different computer on the same arduino, try a different arduino on the same computer, and try using a different USB cable.

If the issue is with the computer:

  • Double-check all computer-related issues in the "easy fixes" list above.
  • Reinstall the IDE.
  • Reinstall the drivers.

If the issue is with the Arduino:

  • Double-check all board-related issues in the "easy fixes" list above.
  • Make sure the microcontroller is seated correctly.
  • You may need to burn the bootloader.
  • Replace the microcontroller if you have another one handy nearby.
  • You may have bricked your Arduino. Sorry :(
  • 3
    There are other possible causes. Your could have damaged the ATmega, you could have damaged the bootloader on the ATmega, you could have power issues, or a myriad of other possibilities. The not in sync: resp=0x00 is really a generic "ATmega not responding" message. Anything that could cause the ATmega to not respond can cause it. – Connor Wolf Feb 24 '14 at 4:47
  • So can I not have anything in 0 or 1 ever? – Tim Mar 31 '15 at 14:40
  • 2
    @Tim You can connect stuff to those pins, but you have to disconnect them if you want to communicate with your Arduino via the USB cable. – The Guy with The Hat Mar 31 '15 at 15:12
  • I got this error on my very first Duemillanove years ago. It was a dead UART chip (or connection from USB to UART chip). Very frustrating. I bought an AVR programmer and burned the bootloader. Purchased another CPU with bootloader preloaded. Wasn't until vendor sent a replacement that I was able to join the world of Arduino aficionados (and I now have two spare CPUs). – linhartr22 Jul 31 '15 at 22:07
  • "Disconnect and reconnect the USB cable" works for me – Grace Shao Aug 5 '15 at 19:58
12

Unfortunately, it can also mean that you burned your microcontroller. Were you doing anything dangerous right before you tried to upload a new sketch? Is the microcontroller still working, with its previously loaded sketch?

10

If none of the above steps work, try reinstalling Avrdude and the avr-gcc compiler. I had to do this after my Mega started suffering from this.

If you installed Avrdude and avr-gcc separately, simply uninstall them. if not, you may have to reinstall the Arduino IDE. These steps will depend on your operating system.

  • Its highly unlikely that the problem would be caused because of the toolchain being used. This is too extreme, IMO. – asheeshr Feb 12 '14 at 3:11
  • 3
    It's the only way I could solve my problem – TheDoctor Feb 12 '14 at 4:24
  • What is this installation process you are talking about? The arduino editor tool is just unzipped. There is no installation process. – Connor Wolf Feb 24 '14 at 4:48
9

I've had the same message. Every time it has been solved by selecting the right port ie USB under the menu Tools then Ports. Its a simple step but I always forget. I'll unplug the Arduino to stop the current program, plug it in again to my computer to upload the new program and get the error, panic, curse, and only then, remember.

  • 1
    I think this is the most common solution. – chicks Jun 21 '15 at 13:52
9

In my case I hadn't wired the RTS pin of the FTDI chip to a capacitor which went to the RST pin of the Arduino Pro Mini. Once I installed this connection, I no longer got the error and I was able to upload code.

Nick Gammon explains this in his forum. I've added a picture of where/how the capacitor should be placed. enter image description here

  • +1 for the nice picture of the usb programmer hookup directly to an atmega chip. – raddevus Jun 24 '16 at 13:30
5

I had the exact same problem. I tried installing the IDE in another laptop and uploaded the program from that laptop. Problem solved. Then I came back to my laptop, uninstalled the IDE and re-install it.. it started working.

However, I wasn't satisfied because I couldn't find the source of the problem... so I tried running everything again the same exact way... I found the problem but not sure if that can be the actual cause of it.

In my project, I needed to carry out serial communication between arduino and MATLAB (GUI). In order to see/verify the output(type) of MATLAB (GUI) serial data, I used HYPERTERMINAL and also VIRTUAL SERIAL PORT EMULATOR. I noticed that every time when when hyperterminal is running or VSPE is running while my serial monitor is on it screws up the uploading feature of the program. I'm not sure if it's because of the VSPE or HYPERTERMINAL, but reinstalling the IDE worked for me.

  • 2
    One of the Serial Control lines, I think it is DTR, is used to reset the Arduino. When you try to program your Arduino, your terminal program could be interfering. – linhartr22 Apr 23 '15 at 20:06
  • This worked for me only when I also deleted my Arduino Library folder, which contains all settings and extra libs. – Jethro Jun 21 '18 at 10:30
5

Another fix:

Change Tools->Processor->Atmega 328P to Atmega 328P (Old Bootloader).

This worked for my Arduino Nano with CH340, using Arduino IDE 1.8.5 under Linux Ubuntu 17.10.

  • 1
    That was the solution! The new bootloader uses twice the baud rate (115200 instead of 57600). – Suuuehgi Jan 2 at 12:37
3

For people using Linux Mint I found that by selecting the "TTY SO" port instead of the one labeled "Arduino" it would work (I can't tell you exactly because I don't have that computer in front of me right now).

Then the next time I used the Arduino I again got the same message so I switched back to the "Arduino" port and it has worked that way ever since.

I am not as technically knowledgeable as the rest of you guys so I have no idea why this works or what the problem was, but it worked which is all I care about. Maybe this will be useful to someone.

3

I uninstalled the IDE and drivers etc, installed it all again, then I ran the Arduino IDE as an administrator and set to run compatibility as windows 7 (I'm currently using 10).

I also changed the programmer to AVR ISP (I don't think this matters, but I changed it anyway).

All is working again... hopefully, this can help someone else out too.

2

An unusual one but I've been swapping out the microcontrollers a lot and i got this error when one wasn't seated correctly.. i was able to burn a few times but i guess it slipped back out - a little push on the back of the ATMega328 fixed it!

1

There is also the possibility of the the controller itself being placed the wrong way in the socket on the Arduino. This can be dangerous for the controller (which may get zapped) but, in my case, it only gave the out of sync error, preventing me from uploading code.

So just check if the notch on the IC is in the right direction (you can cross check with images of board online). The notch on the Uno's controller should point towards edge of board.

1

I had this error come up too. It was the first time using a new Arduino Nano board after I had soldered on headers. Just tyring the Blink Sketch, nothing was connected to the board.

I found a tiny short of solder between the GROUND and RESET pins. I picked it off and then I could upload ok.

I suppose this might happen if you had the same short on a circuit somewhere.

1

Just had this same error with a brand new Mini Pro. Since the default blink program that came preloaded with most Arduino is running, I know that the unit is probably OK.

So I inspected the headers I just soldered one more time, and found that there was not enough solder on the TX0 pins. After re-soldering every works.

1

After lots of unplugging, checking ports, restarting IDE, etc. The ting which seemed to make a difference fixing this fault with Arduino Mega 2560 was to uninstall the windows USB arduino driver then reinstall it usig the driver here & select manually from the list>com ports>arduino http://drivers.softpedia.com/get/Other-DRIVERS-TOOLS/Others/Arduino-Mega-2560-USB-Driver-1110-for-Windows-7-64-bit.shtml I may have tested it on my uno then back to the mega so there's a small chance talking to the uno made AVRDUDE happy but unlikely.

1

When I get a problem uploading to my boards I upload a different program like the blink example. This seems to reset something and I am then able to upload my own program (which is quite large).

It might be worth trying this to see if it works in your case, although I have no idea why it works.

  • what board and bootloader? – Juraj Jun 18 '18 at 11:21
  • Arduino Nano, ATMega328P (not 3rd party). Hardware Version: 2, Firmware Version: 1.16, device signature is 0x1e950f I have not checked the bootloader, but they are advertised as the "traditional bootloader" – Jethro Jun 18 '18 at 12:37
  • so your answer is specific for old Nano bootloader – Juraj Jun 18 '18 at 12:41
  • Thanks! I will look at bootloaders and try to upgrade it. Do you have any info on this bug? – Jethro Jun 18 '18 at 12:43
1

I had a similar issue with my Uno board

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x90

Tried many methods

  • Press reset before sending packets
  • different IDE versions
  • Change cable
  • Change controller itself
  • Loopback test

but all of the above failed.

I use Ubuntu 16.04.4 LTS 4.15.0-33-generic (while writing this comment). The CDC ACM module was not loaded, therefore no /dev/ttyACM0 device was created to select in Arduino IDE -> Tools -> Port

Therefore, Get the module name and load it

$ lsusb 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


$ sudo modprobe cdc-acm

The above command will insert the required module. Now i'm able to select the right port and upload the code

Out of various solutions this worked for me, hope this helps someone too.

0

I solved it by updating the boards (under "board manager")

  • Do you have an Arduino Nano? – per1234 Jun 6 '18 at 22:20
0

I faced the same problem for some code today and I solved it as follows:

1- First I ran a basic LED blinking code. It gave the same error. It confirms that the error is in uploading and has nothing to do with compiling. I also checked my code was compiling fine.

2- I took another board, but it was working fine on this PC. That means computer and the USB wire is OK.

3- I connected the faulty board to another PC, and surprisingly, there was no such error in uploading. That gave me hint about issues in driver in the first PC.

4- So I uninstalled the driver and re-installed it on the first PC by downloading from here

( make sure that while installing the driver from this link, you keep your board connected to the PC)

It worked fine now :-)

0

I had this error in my Linux Mint 17.3 laptop with Arduino Nano avrdude: stk500_getsync(): not in sync: resp=0x00

Solved:

  • removed all that had 'arduino' or 'avr' in its name
  • removed directories .arduino and .arduino15 (Note the dot in the name)
  • removed ver 1.8.7 with uninstall of the packet
  • apt-get install arduino (ver 1.1.0)
  • tested with a simple sketch (everything OK)
  • installed ver 1.8.7 with the install of the packet
  • compiled.
  • selected ATmega328p(Old bootloader) for processor, Arduino Nano for card and /dev/ttyUSB0 for port => IT WORKS !

It seems that the 'Old bootloader' was the trick in this case. I have now both ver 1.1.0 an 1.8.7, who cares.

  • you should first read the answer from aguadopd – Juraj Sep 27 '18 at 18:33

protected by Community Dec 29 '18 at 21:42

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.