Search This Blog

Wednesday, July 24, 2013

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


This error happens whenever the Arduino IDE software can't talk to the Arduino board.
Code compiles and it gets to 90% on the progress bar and hangs.  Eventually it says
avrdude: stk500_getsync(): not in sync: resp=0x00

This could have any number of causes.  Just jotting down some of the things that have gone wrong and how I've fixed them.  Not detailed instructions, detail is everywhere on the web.


  • Is it plugged in?  Right port selected on Tools->Serial->Port.  Try a different cable.  Is the power light on the Arduino green?  Are the TX/RX lights flashing during upload?
  • Make sure the Arduino drivers are installed on your machine.  This usually happens when you load the software, but not always.
  • Go to the Computer->System->Device manager and find the arduinos.   Are they properly recognized?  if not, right click and update the driver with the Arduino drivers in the download
  • People often claim hitting the Arduino reset right after compilation will make it work.  That has never worked for me.
  • Sometimes the bootloaders get corrupted on the AVR chip.  To fix that you should get a AVR MKII ISP programmer from Digikey. http://www.digikey.com/product-search/en/programmers-development-systems/in-circuit-programmers-emulators-and-debuggers/2621880?k=avr%20mkii%20isp.   They are $37 but if you do enough Arduino work it is worth it.   There are ways to hack this up with another Arduino, but I've never tried it.   The Tools menu has settings for which programmer you have and to burn the bootloader.  You connect the programmer to the USB and plug it into the Arduino ISP header.  You have to supply 12V to the Arduino from the power jack.   Disconnect the Arduino USB connection and burn the bootloader.  Then upload your program with the programmer using the File->Upload using programmer.   Unplug the programmer from the Arduino and it should work normally.
  • Using the programmer you can just load the program through the ISP, without burning the bootloader, and sometimes everything will begin to work again.   Other times it will program fine, but the serial interface will still not work.  
  • I had two Arduino boards which none of the above worked.  The chip is probably dead..  I decided to try replacing the microcontrollers.   Order the ATMEGA328P-PU-ND http://www.digikey.com/product-search/en?WT.z_header=search_go&lang=en&site=us&keywords=ATMEGA328P-PU-ND&x=-1691&y=-51 for $3.16.   I pulled the old chip out of the socket and replaced it.  I burned the bootloader using the Arduino software.   Now it works!  Board is saved.

2 comments: