avrdude: stk500_recv(): programmer is not responding on arduino nano

Error:
An error occurred while uploading the sketch
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x40
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x40

I have selected the arduino nano under boards, I have tried all processors, com6 shows up when I plug it in, the CH340 driver is installed correctly, I can upload the same code onto a arduino uno, I have tried different laptops, the cable is the right one as its one of the blue ones that came in a kit, I have tried multiple arduino nanos that I had previously uploaded code onto and completely new ones. Can enyone help me I have spent hours trying to fix it going through countless forums. Any help would be gladly appreciated.

Remove any connections to pins 0 and 1 on your Arduino board. These pins are used for communication with your computer, including uploads. Connecting anything to these pins can interfere with uploads.

KillFlynn:
I have tried all processors

Just to be sure, have you tried uploading with Tools > Processor > ATmega328P (Old Bootloader) selected?

1 Like

Nothing else has been connected and I have tried all processors including the old bootloader

The last thing to try is burning the bootloader. Follow these instructions:

Please let me know if anything is unclear.

When you get to the "Select the target board from the Tools > Board menu" step, I recommend selecting Tools > Board > Arduino Uno. This will free up 1.5 kB of program memory, with absolutely no disadvantages. The Uno's bootloader also doesn't have the watchdog reset loop bug that the Nano "Old Bootloader" has. Just remember to always have Tools > Board > Arduino Uno when using your Nano from then on.

same here,
I am also having the same error
I had tried all the solutions but not solved yet.
help me
mybkexperience

Evi_0:
same here,
I am also having the same error
I had tried all the solutions but not solved yet.
help me

Which Arduino board are you using?

I have hit my head a few times on this for a few different boards, the nano being one of them. I have boards from three sources and I expect each has a slightly difference bootloader.

My issues have been around the baudrate for uploads. What you need to do is modify your 'boards.txt' file. On a Mac it is currently located in ~/Library/Arduino15/packages/arduino/hardware/avr/1.8.2/boards.txt

There is a section that looks like:

 ## Arduino Nano w/ ATmega328P
 ## --------------------------
 nano.menu.cpu.atmega328=ATmega328P

 nano.menu.cpu.atmega328.upload.maximum_size=30720
 nano.menu.cpu.atmega328.upload.maximum_data_size=2048
 nano.menu.cpu.atmega328.upload.speed=115200

 nano.menu.cpu.atmega328.bootloader.low_fuses=0xFF
 nano.menu.cpu.atmega328.bootloader.high_fuses=0xDA
 nano.menu.cpu.atmega328.bootloader.extended_fuses=0xFD
 nano.menu.cpu.atmega328.bootloader.file=optiboot/optiboot_atmega328.hex

Change the max upload speed to 57600, 230400, 19200 etc to see if that fixes the issue. You need to quit and reopen the Arduino IDE when you change these values.

I have not tried this, but it looks like we can just duplicate these values with a new ID for each variant of a nano or other device that we deal with. Case and point, right after the lines above is the "Old bootloader" section in the boards.txt file.

For me every case of stk500_recv errors it has been to a mis-matced baud rate IIRC.

I hope this helps!

The ATmega328P (Old Bootloader) menu option already provides the 57600 baud upload:

This is the first time I've ever heard of a Nano that requires an upload speed other than 57600 or 115200. But, if they don't care about their customers, the manufacturer is free to flash a bootloader that is compiled for any upload speed they like.

pert:
The ATmega328P (Old Bootloader) menu option already provides the 57600 baud upload:
ArduinoCore-avr/boards.txt at 1.8.2 · arduino/ArduinoCore-avr · GitHub

This is the first time I've ever heard of a Nano that requires an upload speed other than 57600 or 115200. But, if they don't care about their customers, the manufacturer is free to flash a bootloader that is compiled for any upload speed they like.

Sure, right below is the entry for the nano with a ATmega168 that has 19200 baud. All this talk about baudrates is bringing me back to my "hardwired serial terminals that were mux'ed to a mini in the computer room with raised flooring and halon fire suppression" days. I get chills thinking about freezing my a** off in one of those rooms. 8)

The core issue from my post:

So what lead me to this thread is the "avrdude: st500_recv()" error that me and many out there are experiencing. It's a very popular error (7,200 posts!) and consequently it's a common roadblock for users. How I got here was due to a baudrate issue and it should be brought forward as a thing to check when dealing with a st500_recv() failure.

An observation:

What is not communicated in the menu choices for the processor is what types of settings are being selected. I would expect the processor entry is about what machine code instruction set will be used. I can see how the bootloader fits into the processor selection.

I would have no idea that choosing the Processor would govern the baudrate. Particularly when right below it is a menu for Port. Back in the day it was the Port that would decide baud rate, parity, stop bits and so on, for your communication link. They are clearly meant to be specified together. It's just a bit of a surprise given that USB has masked the whole notion of serial lines in general.

Caveat Noob:

I'm new to this platform and who knows, may have even changed this baud rate earlier and forgot. I need to know what 'knobs' I may have fiddled with so I can go back and check them. As a noob, I am not on top of all this info.

Suggestion:

Amend the posting for general guidance for this class of issue to include checking the baudrate. General Guidance and How to use the Forum. Make mention of where to find the boards.txt file on the 3 platforms.

Thanks and I hope this helps,
Jay

P.S. And now that I'm recalling all this terminal stuff - what DOES a Gandalf box do anyway???