Ad Space — Top Banner

avrdude: stk500_getsync(): not in sync

Arduino Microcontroller Board

Severity: Moderate

What Does This Error Mean?

This error means the Arduino IDE cannot communicate with the board to upload your sketch. The most common causes are wrong board or port selected, a bad USB cable, or something connected to pins 0/1 (TX/RX). Check your board and port settings in the IDE.

Affected Models

  • Arduino Uno
  • Arduino Nano
  • Arduino Mega 2560
  • Arduino Leonardo
  • Arduino Micro
  • Arduino Pro Mini

Common Causes

  • Wrong board selected in the Arduino IDE
  • Wrong serial port selected
  • Bad or charge-only USB cable (no data lines)
  • Something connected to pins 0 (RX) and 1 (TX) during upload
  • Bootloader corrupted or missing
  • Arduino clone using a CH340 chip that needs a driver

How to Fix It

  1. Check that the correct board is selected: Tools > Board.

    Select the exact board model you are using. Arduino Uno, Nano, and Mega all need different settings. For Nano clones, you may also need to set Processor to ATmega328P (Old Bootloader).

  2. Check that the correct port is selected: Tools > Port.

    Select the COM port that appeared when you plugged in the Arduino. If no port appears, the USB cable may be bad or a driver may be missing.

  3. Try a different USB cable.

    Many USB cables are charge-only and lack data lines. The cable must support data transfer. Try the cable that came with the Arduino.

  4. Disconnect anything from pins 0 and 1 before uploading.

    Pins 0 (RX) and 1 (TX) are used for serial communication during upload. Sensors, modules, or wires connected to these pins interfere with the upload.

  5. For Arduino clones with CH340 chip: install the CH340 driver.

    Many cheap Arduino clones use a CH340G USB-to-serial chip instead of the official FTDI or ATmega16U2. Download the CH340 driver from the manufacturer's website.

Frequently Asked Questions

What is avrdude?

avrdude is the program that uploads compiled code from your computer to the Arduino's microcontroller. It communicates with the Arduino's bootloader over the serial port. The not in sync error means avrdude sent data but got no valid response back.

How do I fix a corrupted bootloader?

You need another Arduino (or an ISP programmer) to re-burn the bootloader. Connect the working Arduino to the target board using the ICSP header, then use Tools > Burn Bootloader in the IDE.