Upload to Nano board fails: "stk500_recv(): programmer is not responding"

Continuing the discussion from Upload to Nano board fails: "stk500_recv(): programmer is not responding":

Initially one of my Nano had the same issue and I switched to the old processor like you said and it worked! I received this output:

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\vishw\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 2
         Firmware Version: 1.16
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\vishw\AppData\Local\Temp\arduino\sketches\6786485AE36AB07E3769D23DEFA98A4F/LoRa_Receiver.ino.hex"
avrdude: writing flash (5692 bytes):

Writing | ################################################## | 100% 1.65s

avrdude: 5692 bytes of flash written

avrdude done.  Thank you.

I did not change the port nor the processor and I tried uploading another code onto another Nano but I got the same issue as I did in the beginning:

Sketch uses 5692 bytes (18%) of program storage space. Maximum is 30720 bytes.
Global variables use 330 bytes (16%) of dynamic memory, leaving 1718 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\vishw\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\vishw\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM4" -b57600 -D "-Uflash:w:C:\Users\vishw\AppData\Local\Temp\arduino\sketches\6786485AE36AB07E3769D23DEFA98A4F/LoRa_Receiver.ino.hex:i"

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\vishw\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x27
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x27
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x27
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x27
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x27
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x27
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x27
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x27
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x27
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x27

avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

Hi @msvvs.

Please try this experiment and then report back with the results:


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


  1. Connect the Arduino board to your computer with a USB cable.
  2. Press and release the button on the Arduino board that is marked "RESET".

Now please reply here on the forum thread with the answer to the following question:

  • Did you see the "L" LED blink multiple times quickly immediately after you released the "RESET" button?

I am so sorry for the late reply.

I have tried what you said and the L LED has been blinking initially but when I pressed the white button (the one below the text "NANO"), the LED turned off briefly for about 2 seconds and resumed blinking again.

I purchased 3 NANO's and the other 2 showed no errors while uploading.

There is a program named a "bootloader" that is stored in a special area of the memory in the primary microcontroller of your Arduino board. This program receives the data sent by the computer when you upload a sketch to the board.

The symptoms you describe indicate that the bootloader is not running when it should be activated. This could have either of the following causes:

  • The memory in the microcontroller where the bootloader was stored has somehow been erased or corrupted.
  • There is physical damage to the microcontroller or its support circuitry.

If the cause is a missing bootloader, the board might be recoverable by a "Burn Bootloader" operation.

Prepare ISP programmer

You will need an ISP programmer. If you don't have a programmer, you can use a spare Arduino board as an "Arduino as ISP" programmer.

Arduino as ISP

The following instructions are for using an Arduino board as an "Arduino as ISP" programmer. If you have a dedicated programmer, you can skip to the next set of instructions.

Although the "Arduino as ISP" only works for programming targets of the AVR architecture, you can also use boards of a variety of architectures (e.g., "AVR", "SAMD", "megaAVR") as an "Arduino as ISP" programmer.


In the instructions below, the board used as an "Arduino as ISP" is referred to as the "programmer board". The board the bootloader is being burned on is referred to as the "target board".


  1. Disconnect the USB cable of the Arduino boards from your computer.

  2. Make the following connections between the "programmer board" and the "target board".
    Refer to the "Connections" table on the SPI library reference page to determine the pin numbers.

    Programmer Target
    CIPO (AKA "MISO") CIPO
    VCC 5V (VCC on 3.3 V boards)
    SCK SCK
    COPI (AKA "MOSI") COPI
    10 RESET
    GND GND
  3. Connect the "programmer board" to your computer with a USB cable.

  4. Select File > Examples > 11.ArduinoISP > ArduinoISP from the Arduino IDE menus.
    The "ArduinoISP" sketch will open in Arduino IDE.

  5. Select your "programmer board" from Arduino IDE's Tools > Board menu.

  6. Select the port of your "programmer board" from Arduino IDE's Tools > Port menu.

  7. Select Sketch > Upload from the Arduino IDE menus.

  8. Wait for the upload to finish.

You are now ready to burn the bootloader using your "Arduino as ISP" programmer.

Burn Bootloader

Instructions for burning the bootloader:

It is not possible to do this via Arduino Cloud Editor. You will need to use Arduino IDE or Arduino CLI.

  1. Connect an ISP programmer to your Arduino board.
    If you are using an "Arduino as ISP", then you have already connected it according to the previous instructions.
  2. Select the target board from the Tools > Board menu and any other custom Tools menus (e.g., Tools > Processor).
  3. Select the appropriate programmer from the Tools > Programmer menu.
  4. Tools > Burn Bootloader
  5. Wait for the process to finish successfully.
  6. Disconnect the USB cable of the programmer from your computer.
  7. Disconnect the programmer from the "target board".

Now connect the "target board" to your computer with a USB cable, select its port from the Tools > Port menu, and try uploading a sketch as usual.

Conclusion

Now connect the "target board" to your computer with a USB cable and try uploading again. Does the upload succeed now?

Can you please check if my pin layout is correct ( The one on the right is the Target board)

It looks perfect!

Sorry, but I just uploaded the ISP code to the programmer board. You want me to disconnect the USB cable and then connect it to the target board or do you want me to connect both of them using two separate usb cables?

Here is my connection for steps 1-8 of Arduino as ISP

No. Leave it connected to the programmer.

No. The programmer board provides power to the target board so you don't need to connect a USB cable to the target for power.

The computer communicates to the programmer board via the USB cable, and it is then the programmer board that communicates with the target via the jumper wires. So you don't need to connect a USB cable to the target for data.

I did not remove the USB Cable from the programmer after uploading the code.
My target board is already set to Arduino Nano and I set the programmer to "Arduino as ISP". Then I clicked "Burn Bootloader" and here is what I get:

The problem is the ambiguity of my instructions here:

I apologize for the confusion. I should have written this:

  1. Select Tools > Programmer > Arduino as ISP from the Arduino IDE menus.

Do that and then try the "Burn Bootloader" again.

Confusingly, there are two programmers in the menu with similar names:

  • ArduinoISP
  • Arduino as ISP

It is logical to think that you should use the "ArduinoISP" programmer since the name of the sketch that turns your programmer board into an ISP programmer is "ArduinoISP". However, the "ArduinoISP" programmer is actually something completely different so you get this error when you attempt to perform a "Burn Bootloader" operation with that programmer selected from the menu. So you must instead select "Arduino as ISP" from the menu.

No it is on "Arduino as ISP"
I've mentioned it in my previous reply.

I've also tried "ArduinoISP" but it didn't work either

The output in the screenshot you shared can only be produced when you have "ArduinoISP" selected from the Tools > Programmer menu.

I'm going to ask you to provide the full verbose output from a "Burn Bootloader" operation.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Check the box next to Show verbose output during: ☐ upload in the "Preferences" dialog.
    This preference applies to "Burn Bootloader" operations in addition to uploads.
  3. Click the "OK" button.
    The "Preferences" dialog will close.
  4. Attempt a "Burn Bootloader" operation, just the same as you did before.
  5. Wait for the "Burn Bootloader" operation to fail.
  6. You will see a "Error while burning the bootloader: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button in that notification.
  7. Open a forum reply here by clicking the "Reply" button.
  8. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block icon on toolbar
  9. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the error output from the upload into the code block.
  10. Move the cursor outside of the code block markup before you add any additional text to your reply.
  11. Click the "Reply" button to post the output.

My settings prior to burning bootloader:

The pins are connected exactly as in the image. I plugged in the USB to the programmer and uploaded "ArduinoISP" example code. Then I selected burn bootloader and I get this error:

"C:\Users\vishw\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\vishw\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega328p -cstk500v1 -PCOM4 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\vishw\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9516 (probably m328pb)
avrdude: Expected signature for ATmega328P is 1E 95 0F
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

Failed chip erase: uploading error: exit status 1

OK, great. That is progress.

This tells us that the manufacturer of your cheap Chinese Nano derivative board put an ATmega328PB microcontroller on the board instead of the ATmega328P that is on the official Nano boards (and fully compatible clones/derivative boards).

The ATmega328PB is a nice chip, so this isn't necessarily a bad thing, but it does mean that we can't use the standard Arduino Nano board definition for this use case. I think the best solution will be for you to use the excellent 3rd party "MiniCore" boards platform, which adds full support for ATmega328PB-based boards to Arduino IDE.

I'll provide instructions you can follow to do that:

  1. Use the Arduino IDE Boards Manager to install the MiniCore platform, following these instructions:
    https://github.com/MCUdude/MiniCore#boards-manager-installation
  2. Select Tools > Board > MiniCore > ATmega328 from the Arduino IDE menus.
  3. Select Tools > Variant > 328PB from the Arduino IDE menus.
  4. Select Tools > Programmer > Arduino as ISP from the Arduino IDE menus.

Now try a "Burn Bootloader" operation again, just as you did before

Okay for some reason this only chip has ATmega328PB and I can't see its markings on the chip even with a flashlight. I followed your steps but I get the same error as before:

"C:\Users\vishw\AppData\Local\Arduino15\packages\MiniCore\tools\avrdude\7.2-arduino.1/bin/avrdude" "-CC:\Users\vishw\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.2/avrdude.conf" -v -patmega328pb -cstk500v1 -PCOM6 -b19200 -e -Ulock:w:0xff:m -Uefuse:w:0b11110101:m -Uhfuse:w:0xd7:m -Ulfuse:w:0b11111111:m

avrdude: Version 7.2-arduino.1
         Copyright the AVRDUDE authors;
         see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

         System wide configuration file is C:\Users\vishw\AppData\Local\Arduino15\packages\MiniCore\hardware\avr\3.0.2\avrdude.conf

         Using Port                    : COM6
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude stk500_getsync() warning: attempt 1 of 10: not in sync: resp=0x15
avrdude stk500_getsync() warning: attempt 2 of 10: not in sync: resp=0x15
         AVR Part                      : ATmega328PB
         Chip Erase delay              : 10500 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         Serial program mode           : yes
         Parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom                 65    20     4    0 no       1024    4      0  3600  3600 0x00 0x00
           flash                  65    10   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           hfuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           efuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           lock                    0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           signature               0     0     0    0 no          3    1      0     0     0 0x00 0x00
           calibration             0     0     0    0 no          1    1      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 version 1.x firmware

avrdude stk500_getparm() error: protocol expects OK byte 0x10 but got 0x14

avrdude stk500_getparm() error: protocol expects sync byte 0x14 but got 0x02

avrdude stk500_getparm() error: protocol expects sync byte 0x14 but got 0x10
         Hardware Version: 50713296
         Firmware Version: 0.2
         Topcard         : STK502
         Vtarget         : 1.8 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us
avrdude stk500_initialize() error: protocol expects OK byte 0x10 but got 0x01
avrdude main() error: initialization failed, rc=-1
        - double check the connections and try again
        - use -B to set lower the bit clock frequency, e.g. -B 125kHz
        - use -F to override this check
avrdude stk500_disable() error: protocol expects sync byte 0x14 but got 0x10

avrdude done.  Thank you.

Failed chip erase: uploading error: exit status 1

It is likely a counterfeit.

You need to start paying better attention if you want to achieve any success in embedded systems! The error is completely different from the previous one, just as the previous one was completely different than the one before it.

When undertaking complex technical endeavors as we often do in our Arduino projects, it is common to end up in a situation where the system has multiple distinct problems. This means that solving one problem only advances you to encountering the next problem in the stack. That is what you have been experiencing. If you don't make the effort to study what the tools are trying to communicate to you via the error messages, then you might get the impression that you are encountering the same error each time, even though actually you are progressing through the stack and the new error has unique information.

Unfortunately I don't have any ideas about what could be done to solve this. It is probably related to the chip being a counterfeit. Maybe one of the other forum helpers will be able to assist. Otherwise, you are probably best off to contact the seller of the board to see if you can get a refund.

Sorry I am new to this and yes I did go thorough the error and checked my connections but it didn't work.

Sadly though the sellers won't accept refunds and its just my bad luck for getting this chip.

Hello, I'm back again. Let me recall my issue for you. I bought 3 Arduino Nano's out of which 2 were working and 1 isn't.

Recently I've been working on GSM project and I don't know if I connected the voltage pins incorrectly but both of the working Nano's stopped functioning properly.

Hopelessly I decided to try using the one which didn't work and for some reason it functioned properly.

Now the 2 working Nano's aren't working now and the one that didn't work before is working now.

What is happening? And there is another issue with the GSM module which I'll mention soon

I'm getting this on the output for both the Nano's:

Please do not post screenshots of output; we can not see which exact command was executed

The baud rate of 115200 indicates that, if you selected the Nano board, you have the 328P selected under tools/processor in the IDE. You can try the different options under tools/processor.

The photos of the boards don't help much as we can't read the print on the chip.

sorry I used my phone for the question.
Here is the Output and selected programmer for the Nano which didn't work before but now is:

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\vishw\AppData\Local\Temp\arduino\sketches\FFFE0C94823967DC0905EEDF6DC6C1E6/GPRS.ino.hex"
avrdude: writing flash (5388 bytes):

Writing | ################################################## | 100% 0.76s

avrdude: 5388 bytes of flash written

avrdude done.  Thank you.

Now, using the two Nano's which worked before but now aren't:

avrdude: Version 6.3-20190619
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\vishw\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done.  Thank you.