Arduino Nano not uploading (clone)

Hello. I have Arudino Nano (clone) currently, and I cannot upload my sketch to it. It has CH340C chip and ATMega328PB.

What I have:

  • Installed Arduino IDE from official website
  • Installed CH340C driver (CH341SER)
  • Have working USB Data cable.

My problem is that I have successfully uploaded my sketch twice, but the uploading process (avrdude) has never finished successfully (it failed on reading or writing stage). It always says different errors like protocol error, 'programmer is not responding', etc. Now I can't upload next sketch.

My Aruduino IDE settings are:
Arudino Nano, Processor: ATmega 328p (old bootloader), COM13 (there is also COM1 as the second choice, but it doesn't work).

OS: Windows 7 x64
CPU: AMD

Latest error log:

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=0xe0

Any help is appreciated.

Thanks in advance,
MrOnlineCoder

Update Board Manager and choose Old Bootloader

1 Like

Have already done it (first post):

MrOnlineCoder:
My Aruduino IDE settings are:
Arudino Nano, Processor: ATmega 328p (old bootloader), COM13 (there is also COM1 as the second choice, but it doesn't work).

I have successfully uploaded another sketch (writing process finsished), but avrdude reporter theese errors:

Reading | 
avrdude: stk500_paged_load(): (a) protocol error, expect=0x10, resp=0xe0
avrdude: stk500_paged_load(): (a) protocol error, expect=0x10, resp=0xe0

###avrdude: stk500_cmd(): programmer is out of sync
avr_read(): error reading address 0x0000
    read operation not supported for memory "flash"
avrdude: failed to read all of flash memory, rc=-2
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0xe0

Try another Nano?

Currently I have no other nanos or even arduinos, I have just received it from delivery service.

Maybe try on another PC?

Try a different cable first.

If that doesn't work, try on another PC.

If that doesn't work, then you'll need another Nano.

I have already tried different cables. It works through time, success rate is like random.

avrdude: writing flash (1970 bytes):

Writing | avrdude: loadaddr(): (b) protocol error, expect=0x14, resp=0xfc
###
avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0xfc
###avrdude: stk500_cmd(): protocol error
avrdude: stk500_cmd(): programmer is out of sync

It seems to me that my nano has a little bit different communication protocol than one that IDE/avrdude uses.

Maybe I should flash/burn bootloader to another one?

Seems that avrdude recognizes the board:

                                  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

P.S. I have tried 3 different USB cables, all of them work correctly (board is detected by Windows and IDE) and with 1 of them I had writing process completed.

Tried uploading when USB cable is connected to back port of my PC. Doesn't work. Seems that there is a problem in my Arduino. How can I make sure of this?

I'll try again on another PC.

Tried another machine. Didn't work. Seems that there is a problem with the board itself. I'll try to burn original bootloader on it.

Well, I have burned bootloader for Arduino Uno to my nano using another Arduino Uno as ISP. Now my nano refuses to program - 'programmer is not responding: resp = 0x0e / 0x9e / etc'.

Note: When I was burning bootloader, avrdude refused to do it, it said 'invalid device signature, double check the chip'. The signature was different by 1 byte from original. So I used -F (--force) flag to do it. Process has completed without any errors.

Did I break my bootloader or something?

Hello. I have Arudino Nano (clone) currently, and I cannot upload my sketch to it. It has CH340C chip and ATMega328PB.

Sorry I missed this.

This is how I got 10 Nano's with the 328PB chip to work for me. There may be an easier way but I didn't find it.

https://forum.arduino.cc/index.php?topic=541588.0

MiniCore. The URL will tell you how to install this.

EDIT: Pulled two Nano' out of the package and both will program using (Old Bootloader).

I realize I am over my head, but this doesn't seem right.
Notice the signature.

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "/tmp/arduino_build_846063/Blink1.ino.hex"
avrdude: writing flash (1022 bytes):

Writing | ################################################## | 100% 0.26s

avrdude: 1022 bytes of flash written

And this using USBasp and averdude. Notice this signature.

 /home/kprims/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino14/bin/avrdude -C/home/kprims/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino14/etc/avrdude.conf -v -patmega328pb -cusbasp

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

         System wide configuration file is "/home/kprims/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino14/etc/avrdude.conf"
         
         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9516 (probably m328pb)
avrdude: safemode: lfuse reads as F7
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as FF

avrdude: safemode: lfuse reads as F7
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as FF
avrdude: safemode: Fuses OK (E:FF, H:DA, L:F7)

avrdude done.  Thank you.

I guess my question is how would I ever change the bootloader without specifying the 328PB chip? And why does the sketch say the chip is a 328P?