Go Down

Topic: Arduino nano v3 chinese clone uploading fail (Read 7548 times) previous topic - next topic

yv1hx

Hello there,

I have an Chinese Arduino nano v3.0 clone, based on the CH340G serial chip, (used as backup while my "main" Nano is working on another task), that I have programmed a couple of times since brand new, this night uploaded the classical "blink" example, everything ok, and then tried to upload another program, but the clone has refused to be programmed, below is the error messages:

Code: [Select]

C:\arduino-1.6.0/hardware/tools/avr/bin/avr-gcc -w -Os -Wl,--gc-sections -mmcu=atmega328p -o C:\Users\HERNAN~1\AppData\Local\Temp\build4498434923828360793.tmp/Blink.cpp.elf C:\Users\HERNAN~1\AppData\Local\Temp\build4498434923828360793.tmp\Blink.cpp.o C:\Users\HERNAN~1\AppData\Local\Temp\build4498434923828360793.tmp/core.a -LC:\Users\HERNAN~1\AppData\Local\Temp\build4498434923828360793.tmp -lm
C:\arduino-1.6.0/hardware/tools/avr/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 C:\Users\HERNAN~1\AppData\Local\Temp\build4498434923828360793.tmp/Blink.cpp.elf C:\Users\HERNAN~1\AppData\Local\Temp\build4498434923828360793.tmp/Blink.cpp.eep
C:\arduino-1.6.0/hardware/tools/avr/bin/avr-objcopy -O ihex -R .eeprom C:\Users\HERNAN~1\AppData\Local\Temp\build4498434923828360793.tmp/Blink.cpp.elf C:\Users\HERNAN~1\AppData\Local\Temp\build4498434923828360793.tmp/Blink.cpp.hex

Sketch uses 1,030 bytes (3%) of program storage space. Maximum is 30,720 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
C:\arduino-1.6.0/hardware/tools/avr/bin/avrdude -CC:\arduino-1.6.0/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM12 -b57600 -D -Uflash:w:C:\Users\HERNAN~1\AppData\Local\Temp\build4498434923828360793.tmp/Blink.cpp.hex:i

avrdude: Version 6.0.1, compiled on Apr  3 2014 at 23:12:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\arduino-1.6.0/hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : COM12
         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=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x01
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x01

avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.



The device manager recognizes the board correctly (see image).

I have another Chinese Nano clone board that I can program seamlessly using the same IDE, laptop USB port and same cable without any glitches, so the typical issue with the serial port drivers is cleared.

I'm suspecting to have a... lets say, a confused  board, any suggestions to correctly diagnose and/or resurrect the gadget will be welcomed.

Thanks in advance.
Marco-Luis
Researcher, Telecom Specialist at www.meteoven.org

DrAzzy

Try telling the IDE that it's an Uno, or a Pro Mini. See if either of those work.

Failing that, use the other nano to bootload the non-working one and see if that fixes it.
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

wilykat

error code 500 can be caused by bad USB cable, try a different cable.  The cheap cable that comes with Chinese clones seems to last only a few minutes or so before it quits so I keep stockpile of non Chinese cables.

yv1hx

error code 500 can be caused by bad USB cable, try a different cable.  The cheap cable that comes with Chinese clones seems to last only a few minutes or so before it quits so I keep stockpile of non Chinese cables.
Where in my post you read "error code 500"? Can be my age and I not see that?

I'm using a good quality HP cable, the same that I have used with my Digital Camera, Arduino, GPS and other gadgets without any problems as I stated before.

Marco-Luis
Researcher, Telecom Specialist at www.meteoven.org

yv1hx

Try telling the IDE that it's an Uno, or a Pro Mini. See if either of those work.

Failing that, use the other nano to bootload the non-working one and see if that fixes it.
Thanks for your recommendations, telling the IDE that my board is a UNO or Pro Mini doesn't work in my case, I get the same error messages.

Regarding burning the bootloader, I never have done that, I wonder if this link: http://www.instructables.com/id/How-To-Burn-a-Bootloader-to-Clone-Arduino-Nano-30/ is the correct procedure to do so.

BTW, Only for caution, I leave my Laptop this morning cleaning with cCleaner, a lot of garbage was cleaned, but since then the USB port has been behaving with the confused  module; in the other hand, the "production" module has been working great.

Maybe I have also a partially corrupted driver, if such thing is possible?
Marco-Luis
Researcher, Telecom Specialist at www.meteoven.org

DrAzzy

#5
Feb 02, 2016, 08:15 pm Last Edit: Feb 02, 2016, 08:15 pm by DrAzzy
Regarding burning the bootloader, I never have done that, I wonder if this link: http://www.instructables.com/id/How-To-Burn-a-Bootloader-to-Clone-Arduino-Nano-30/ is the correct procedure to do so.

BTW, Only for caution, I leave my Laptop this morning cleaning with cCleaner, a lot of garbage was cleaned, but since then the USB port has been behaving with the confused  module; in the other hand, the "production" module has been working great.

Maybe I have also a partially corrupted driver, if such thing is possible?
That is the process for burning bootloader - but if the board works under some conditions, that's not the problem.

If you've run ccleaner on your ocmputer, and now it works, you know the bootloader is fine, and you may have/have had driver issues - it's clearly not a problem with the board in this case.
Windows' usb drivers can get into a temporary bad state on windows where they don't work with a specific device in a specific port for no apparent reason, and rebooting or moving it to a different port fixes it (I've seen this with keyboards and mice, not just Arduinos).
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

yv1hx

DrAzzy:

Thanks again,

Regarding the USB devices misbehaving, I also have noted this issue in the past, also with mices and Keyboards, so I agree with you.

Now I'm sure to have the need to burn the board, on power up, the on board led has been flashing flashing 7 times about once per second, then stay lit for about 3 or 4 seconds, then off, other times has been flashing randomly on power up, no matter the USB port that I use to power the board, surprisingly, pushing the reset button doesn't have any effect.

Unfortunately, I don't have another PC on hand to do further testings  :smiley-confuse:

I have been checking the pinouts for burning the board following the above mentioned link, should the MISO line in one board be connected to the MOSI line in the another?

Marco-Luis
Researcher, Telecom Specialist at www.meteoven.org

yv1hx

"Houston, we have a problem..."  :smiley-confuse:

Followed the instructions carefully, connected everything as suggested, and no success ...

I forgot to mention, I'm using the IDE 1.6.0

Code: [Select]
Arduino: 1.6.0 (Windows Vista), Board: "Arduino Nano, ATmega328"

C:\arduino-1.6.0/hardware/tools/avr/bin/avrdude -CC:\arduino-1.6.0/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM13 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m


avrdude: Version 6.0.1, compiled on Apr  3 2014 at 23:12:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\arduino-1.6.0/hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : COM13
         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_recv(): programmer is not responding
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.


Please see attached the images of my setup.

Almost midnight in this corner of the world...I'm tired for now, tomorrow I will have a look of the signals with my Scope.

Marco-Luis
Researcher, Telecom Specialist at www.meteoven.org

yv1hx

Hello there,

Just an update:

This afternoon tried the following steps:

0) Do a fresh restart to my Windows Laptop,
1) Plugged the "know working" board, programmed the "Blink" example (worked as expected), then,
2) Removed the "know working" board and plugged the "confused" board, the system recognizes this board with the same COM port number as her good behaving sister.
3) Tried to program the "blink" example...fails miserably...

Come to my mind..."It's must be a corrupted driver", so:

4) Uninstalled the CH341SER drivers, rebooted again, then reinstall the driver, rebooted again...

5) Plugged "confused" board, after a minute or so, the system recognizes this board with the COM9 port, (different number from earlier), same info displayed on the Windows Device Manager.
6) Repeated the steps 1 to 3, the board fails again...
7) Now followed again the steps mentioned in post #4 for burning the bootloader, the first time obtained this output:

Code: [Select]
Arduino: 1.6.0 (Windows Vista), Board: "Arduino Nano, ATmega328"

C:\arduino-1.6.0/hardware/tools/avr/bin/avrdude -CC:\arduino-1.6.0/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM13 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m
avrdude: Version 6.0.1, compiled on Apr  3 2014 at 23:12:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\arduino-1.6.0/hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : COM13
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x15
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x15
         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

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
         Hardware Version: 537397968
         Firmware Version: 537397972.537397968
         Topcard         : STK502
         Vtarget         : 1.8 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

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.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.


Please note, is an new error message, (at least different from the others that I have get).

8) Tried again (3 times in a row), and now I get this error:

Code: [Select]
Arduino: 1.6.0 (Windows Vista), Board: "Arduino Nano, ATmega328"

C:\arduino-1.6.0/hardware/tools/avr/bin/avrdude -CC:\arduino-1.6.0/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM13 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m
avrdude: Version 6.0.1, compiled on Apr  3 2014 at 23:12:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\arduino-1.6.0/hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : COM13
         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_recv(): programmer is not responding
Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.


9) Write this long post...

Googling the error codes has been more confusing than helpful, so now I'm more "confused" than my  "confused board"... (Sorry for the pun).

Any suggestions ???
Marco-Luis
Researcher, Telecom Specialist at www.meteoven.org

Taub

error code 500 can be caused by bad USB cable, try a different cable.  The cheap cable that comes with Chinese clones seems to last only a few minutes or so before it quits so I keep stockpile of non Chinese cables.
I have been trying for hours and this was my fix :| changed cable and it works perfectly, thanks!

yv1hx

I have been trying for hours and this was my fix :| changed cable and it works perfectly, thanks!
Good for you!
Marco-Luis
Researcher, Telecom Specialist at www.meteoven.org

mcornhill

Just wish to add the following to this post which may assist others.

I'm using Arduino IDE 1.8.5 and the Arduino Nano under Ubuntu Linux desktop 1604.
I also had the sync errors when attempting to upload my sketch.

The Nano is a clone board labelled as NANO DCCduino.

I resolved my errors by selecting the Tools menu > Processor > ATmega328P (Old Bootloader)

I could then upload successfully. It automatically drops the serial speed down from 115200 to 57600.

I hope this helps someone.

fleming

Just wish to add the following to this post which may assist others.

I'm using Arduino IDE 1.8.5 and the Arduino Nano under Ubuntu Linux desktop 1604.
I also had the sync errors when attempting to upload my sketch.

The Nano is a clone board labelled as NANO DCCduino.

I resolved my errors by selecting the Tools menu > Processor > ATmega328P (Old Bootloader)

I could then upload successfully. It automatically drops the serial speed down from 115200 to 57600.

I hope this helps someone.
Indeed!
It worked for me, thanks for sharing... I was ready to burn the bootloader again.

Regards

yv1hx

Hello ArduinoFellas,

I know this thread is a bit old, but always is a good Netiquette closing the thread and post the findings or solutions.

I give away the confused board to a fellow engineer with more instrumental and capabilities to deal with surface mounted components than me, confirming my last suspicion, he managed to find the CH340G serial chip faulty, so that was the failure that take me nuts for some time.

As today, the "sister board" is still working great ...

Hope this can help someone.
Marco-Luis
Researcher, Telecom Specialist at www.meteoven.org

Go Up