Nano Won't Burn Bootloader to Replica Nano

I have a board that's main function will be to run several motor controllers. On the board, there are all the components from the Arduino Nano 3.2 schematics available online. I am using an ATmega328P. The master Nano is either a 3.2 or 3.3, I don't remember- but I am trying to find the box.

Regardless, I am waiting to put the other components onto the PCB until I confirm that the arduino part of the board works as expected. I connected the USB port, and attempted to download code. From reading other forum posts, I figured out that I needed to make sure it had the bootloader.
I then completed the following steps:

  • Connected the 5v, gnd, D11, D12, and D13 pins from the master board to the same pin on the slave board.
  • Connected D10 from the master board to rst on the slave board.
  • Downloaded the ArduinoISP program onto the master board with the correct COM port, board, and processor (with the programmer set to "Arduino as ISP"). This completed successfully.
  • Clicked "Burn Bootloader"

That is when I get these errors:

         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: stk500_program_enable(): protocol error, expect=0x14, resp=0x66
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x64

avrdude done.  Thank you.

Error while burning bootloader.

I don't have any LEDs on the master Nano yet, as I am trying to source some resistors. I will try to get the LED output of the ISP soon.

Other things I have tried:

  • Loopback Test: successful
  • Commented and uncommented "#define USE_OLD_STYLE_WIRING" (Neither worked)
  • Swapped the 328P on the board for the other one I bought
  • Restarting everything/trying different cables
  • Triple checked all soldered components
  • Ran the avrdude command with '-F' (unsuccessful as well)

Any help would be greatly appreciated!

Can you post your schematic please. :slight_smile:

Both of the boards follow the official schematics located here:
http://https://www.arduino.cc/en/uploads/Main/Arduino_Nano-Rev3.2-SCH.pdf

These are the connections between the boards:

I've found that this process works for me only if I have a 10uF capacitor to ground on the programmer Nano's reset pin. I'm running v1.8.8 of the IDE. I've been told repeatedly that I shouldn't need this capacitor when using any of the newer IDE versions, but nevertheless I do need it for the flashing to work, including when using AVRdude. You might just give it a try.

I've found that this process works for me only if I have a 10uF capacitor to ground on the programmer Nano's reset pin. I'm running v1.8.8 of the IDE. I've been told repeatedly that I shouldn't need this capacitor when using any of the newer IDE versions, but nevertheless I do need it for the flashing to work, including when using AVRdude. You might just give it a try.

I added the capacitor, ran the same steps, and nothing changed. :confused:
I also doubled checked what version of the IDE I'm on, and I'm on 1.8.13.

I don't know if this is relevant, but I downloaded the IDE again and my error message is essentially the same, but slightly different.
Here it is:

Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino Nano, ATmega328P"

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avrdude -CC:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\hardware\tools\avr/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:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\hardware\tools\avr/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.05s



avrdude: Device signature = 0x00ffff

avrdude: Expected signature for ATmega328P is 1E 95 0F

         Double check chip, or use -F to override this check.



Error while burning bootloader.

avrdude done.  Thank you.

Your latest error is exactly what I get if I don't connect the slave to the master and press "burn bootloader". When connecting 2 Nano's together as per your schematic it works just fine. So I suspect your board. Maybe try with a naked atmega328p or another nano first as slave?

I tried using two completely new nanos to have them burn the bootloader on eachother. Neither configuration worked with the slave or with the master. Here is the error I am getting when trying to burn the bootloader:

      Using Port                    : COM12
         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: stk500_program_enable(): protocol error, expect=0x14, resp=0x66
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x64

avrdude done.  Thank you.

Error while burning bootloader.

The reason for the error directly above was because I still had the #DEFINE for the old wiring style. I updated that, and both arduinos could burn to eachother. When I tried this configuration with the other PCB, I get a different error, which is this one:

         Using Port                    : COM12
         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.04s

avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)

Reading | ################################################## | 100% 0.05s

avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)

Reading | ################################################## | 100% 0.05s

avrdude: Device signature = 0xffffff (probably .avr8x_mega)
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Error while burning bootloader.

Why would the device have the wrong signature?

I think that error message can also result from a wiring problem. If you know that the programmer Nano is working correctly, then it seems something must be wrong with your target's board. Perhaps something else is also connected to the SPI pins that's messing things up. Or I guess something could be wrong with the chip, but that's really unlikely

That is not the device signature, but a more or less random value, that you will get if the connection is not good. I start to wonder if you added passive or active components on your board that connect to the same pins D11, D12 and D13 while you try to burn the bootloader. If so, I would desolder those components, so that no other active or passive components can interfere with the Nano <> Nano connection.
You may want to post the schematic of you board here,

Oops, forgot to respond.

I got it working- you were all on the correct track.
The issue here was that there were other passive components attached to the programming pins.
Thank you everyone for your help.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.