Problem with burning bootloader on nano using nano

I have a nano with a scrambled bootloader that I'm trying to reload. I've been following the instructions at: Burning a bootloader to an Arduino Nano using another Arduino | sysexit When I activate "Burn Bootloader" I get the following output:

Arduino: 1.8.13 (Mac OS X), Board: "Arduino Nano, ATmega328P"

/Users/me/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/Users/me/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -cstk500v1 -P/dev/cu.usbserial-1410 -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 "/Users/me/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/Users/me/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbserial-1410
         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

Error while burning bootloader.
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.

Can anyone suggest a next step? Thanks!

Is the microcontroller on the board an ATmega328p or an ATmega328PB? If you look closely at the largest black chip on the top of the Nano, you should be able to see whether it's marked with a "P" or a "PB".

Both boards are BP

OK, then I would recommend using MiniCore:

This excellent boards platform has full support for the ATmega328PB.

  • Install following the "Boards Manager Installation" instructions (stop before you get to the "Manual Installation" section).
  • Select Tools > Board > MiniCore > ATmega328 from the menu.
  • Select Tools > Variant > 328PB from the menu.
  • Select Tools > Programmer > Arduino as ISP (MiniCore) from the menu.
  • Click Tools > Burn Bootloader

After that, you should continue using the board with the sameTools > Board and Tools > Variant settings as you had when you burned the bootloader. Don't attempt to go back to using it as a Nano.

Bootloader burn worked very well using the excellent instructions you provided. Unfortunately, my code no longer compiles with this bootloader. I'm getting the error message:

/Users/me/Arduino/code/libraries/NeoSWSerial/src/NeoSWSerial.cpp:511:6: error: #error MCU not supported by NeoSWSerial!
     #error MCU not supported by NeoSWSerial!

I've tried several SoftwareSerial options, and NeoSWSerial is meeting my needs the best. Is there a way I can use it with MiniCore?

You can see the code related to the error here:

The ATmega328PB has an extra hardware serial port on pins 11 and 12. So, unless you really need three serial ports, you should be able to just use Serial1 in your sketch and do away with NeoSWSerial entirely.

I did all this very successfully about 3 weeks ago (including using Serial1 instead of NeoSWSerial; an unexpected and excellent suggestion!). I'm now trying to replicate this, burning another nano with a MiniCore bootloader. I think I'm following the same procedure, but getting the following when I hit "Burn Bootloader":

avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
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=0x10

avrdude done.  Thank you.

Error while burning bootloader.

Any thoughts? Thanks!

Try connecting a 10 uF capacitor between the GND and RST pins on the Nano you're using as the "Arduino as ISP" programmer.

This error is caused by the programmer board's auto reset circuit causing a reset when the Burn Bootloader process starts. The capacitor disables the auto reset circuit. Often you can get away without using the capacitor, but other times you'll find it's necessary.

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