Burn bootloader arduino nano

I have my uno with the arduino as isp sketch loaded. I have the ICSP header connected to the pins on the UNO. Everything is connected properly. I have Nano as the board selected, port is the one for the uno, programmer is arduino as isp. I click burn bootloader and get the following error:

avrdude: Expected signature for ATmega328P is 1E 95 0F
         Double check chip, or use -F to override this check.
Failed chip erase: uploading error: exit status 1

Here is the verbose output:

"C:\Users\*****\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\*****\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega328p -cstk500v1 -PCOM7 -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\*****\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM7
         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 = 0x1e940b (probably m168p)
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

Is the nano trashed?

Did you attach the reset-blocking capacitor to the Uno?

Did you connect power and reset wires?

There above guide does not mention the reset blocking cap :thinking:

You have a Nano with an Atmega168p processor, not with an Atmega328p processor.
You can still use that (though half the memory capacity), but you will need to install the "MiniCore" boards package via "Boards Manager". As that package supports also the 168 processor.

[edit] I forgot that the standard Nano support in the Arduino IDE also has the option to select the 168 processor. That's even simpler

This one does:

https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP/

I have tried and tried. I can't get this thing to take a bootloader. I'll get another if I need one.

Thanks for the replies.

Did you try this? -> post #3

Yep.

What error message are you getting now?

Too bad you can't post pictures of what you have and how you have everything arranged.

Why do you have to 'burn a bootloader' anyway?
Will it program via ICSP?

I can't upload sketches to the board. I have two of these and this one won't work. I had a couple other boards that would not take a sketch and burning the bootloader fixed them. One UNO I took the chip out and burned it with a breadboard and it works. One pro mini I was able to burn and it works now. I assure you everything is connected as it should be according to the guides I have read.

As for the 168P, I got the same error as if I had chosen 328P.

You are getting this error with the IDE configured as follows???
Tools > Board "Arduino Nano"
Tools > Processor "ATmega168"

Yes. Before I had selected 328p. This was in error. But after changing to 168p, I still got the upload error.

But what is the current error message? It should not be showing the expected signature is for an ATmega328P when ATmega168 is selected

I just completed another attempt. Here is how I have it connected to my UNO.

ICSP on Nano:
Pin1 MISO
Pin2 5v
Pin3 SCK
Pin4 MOSI
Pin5 RESET
Pin6 GND

Connection to UNO:
5v and ground to obvious connectors.
Pin1 to UNO12
Pin 3 to UNO13
Pin4 to UNO11
Pin5 to UNO10

In the IDE I have the following settings under 'tools'.
Board: Arduino Nano
COM: COM7 UNO
Processor: ATMEGA168
Programmer: Arduno as ISP

This is the error when attempting a burn:

"C:\Users\****\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\****\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -patmega168 -cstk500v1 -PCOM7 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xF8:m -Uhfuse:w:0xdd: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\****\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM7
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega168
         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        512    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     16384  128    128  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 = 0x000000 (retrying)

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

avrdude: Device signature = 0x000000 (retrying)

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

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


avrdude done.  Thank you.

Failed chip erase: uploading error: exit status 1

So I kinda feel dumb right now. I forgot about installing the minicore package above. I selected it and the bootloader burned successfully. However, when trying to upload a sketch the normal way it fails. I again selected minicore and the sketch uploaded. Why can't it all just work as intended? Is it due to the clone boards out there? Or does it have to do with the 168 chip on the nano?

I inspected my other Nano and it has the 328P chip. This one has a 168A. I don't know why I bought this one. Maybe I got a 'deal' on it?

Odd that the Arduino Nano with atmega168 setting cannot even read the signature, but MiniCore works.

If you burn the bootloader using MiniCore, then you may need to use MiniCore when uploading the sketch. The baud rate for uploading may be different than that used by the Arduino board package.

If you use Minicore and burn the bootloader, you get the Urboot bootloader, which is more efficient than the standard Optiboot bootloader.

1 Like

Are you clicking on Upload or Upload Using Programmer (assuming that the NANO Board is connected with host Arduino over the ICSP Port)?

It works as intended :slight_smile: A 168P is not an 168 nor a 328P. Note that there have been official Arduino boards that were manufactured with the 168; the Nano is one of them else there would not have been a 168 option in the processor menu.

@hmeijdam already pointed out that Minicore uses a different bootloader so you can not upload using a normal Arduino Nano.

Which is contradicted by avrdude: Device signature = 0x1e940b (probably m168p).

The 168A is a 168; so the signature should be 0x1e9406. What you more than likely have is a 168P that was relabelled by some crappy manufacturer to meet their needs (sales).