183

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?

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

21 Answers 21

115

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 :(
13
  • 7
    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. Commented Feb 24, 2014 at 4:47
  • 4
    So can I not have anything in 0 or 1 ever?
    – Tim
    Commented Mar 31, 2015 at 14:40
  • 7
    @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. Commented Mar 31, 2015 at 15:12
  • 1
    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
    Commented Jul 31, 2015 at 22:07
  • 1
    Could you please append also Tools->Processor->Atmega 328P to Atmega 328P (Old Bootloader) to the list of possible solutions. Commented Jun 5, 2019 at 19:47
78

Another fix:

Change Tools->Processor->Atmega 328P to Atmega 328P (Old Bootloader). Remind that the Processor option is only available when you select some specific Boards at Tools>Board.

This worked for my Arduino Nano with CH340, using Arduino IDE 1.8.5 under Linux Ubuntu 17.10. Besides, this will probably happen if you use IDE 1.8.9 or newer and you get an old or cloned Nano.

0
13

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?

12

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.

2
  • Its highly unlikely that the problem would be caused because of the toolchain being used. This is too extreme, IMO.
    – asheeshr
    Commented Feb 12, 2014 at 3:11
  • What is this installation process you are talking about? The arduino editor tool is just unzipped. There is no installation process. Commented Feb 24, 2014 at 4:48
12

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

3
  • +1 for the nice picture of the usb programmer hookup directly to an atmega chip.
    – raddevus
    Commented Jun 24, 2016 at 13:30
  • I also had some bad connections on my board, I unplugged everything and uploaded a basic sketch and it worked. Now go figure what cable is not in the right place
    – Seraf
    Commented Jun 22, 2019 at 1:03
  • I am using ATMEGA8-16PC. I burned the bootloader onto the mcu with SCK, MISO and MOSI pins on the my Arduino uno. Do I then need to change the connections to TxD and RxD to upload sketches to the mcu? Like say making a LED at mcu's Pin 1 blink. Commented Sep 26, 2023 at 19:13
10

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.

0
7

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
  • 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
    Commented Apr 23, 2015 at 20:06
  • This worked for me only when I also deleted my Arduino Library folder, which contains all settings and extra libs.
    – Jethro
    Commented Jun 21, 2018 at 10:30
6

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.

6

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.

4

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.

3

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!

3

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.

2

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.

2

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.

2

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

1
  • Do you have an Arduino Nano?
    – per1234
    Commented Jun 6, 2018 at 22:20
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.

4
  • what board and bootloader?
    – Juraj
    Commented Jun 18, 2018 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
    Commented Jun 18, 2018 at 12:37
  • so your answer is specific for old Nano bootloader
    – Juraj
    Commented Jun 18, 2018 at 12:41
  • Thanks! I will look at bootloaders and try to upgrade it. Do you have any info on this bug?
    – Jethro
    Commented Jun 18, 2018 at 12:43
1

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

1

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.

1
  • you should first read the answer from aguadopd
    – Juraj
    Commented Sep 27, 2018 at 18:33
1

What I tried was to not connect one Ground of one board to the other ground on the other board. This stopped the problem for me.

1

If you use arduino-cli and a Arduino Nano clone, you can change the bootloader to the old one, as said in other answers, by using the following command to upload to the Arduino:

arduino-cli upload -v -p /dev/ttyUSB0 --fqbn arduino:avr:nano:cpu=atmega328old program_name

Explanation:

command explanation
arduino-cli call arduino-cli
-v Use verbose output
-p /dev/ttyUSB0 The port, use arduino-cli board list to find the right port
--fqbn arduino:avr:nano:cpu=atmega328old Use avr board library, nano board and the Atmega328 CPU with the old bootloader
program_name Replace this with the name of the program you want to upload

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