logo elektroda
logo elektroda
X
logo elektroda

[Solved] Arduino Nano CH340 Clone: Uploading Issues on Windows 7 - Error & LED Status Explained

lighter1974 30735 19
Best answers

Why does an Arduino Nano clone with a CH340 USB-serial chip fail to upload sketches on Windows 7 with avrdude "stk500_recv" / "not in sync" errors, and what settings or bootloader should I use?

The upload failure is most likely caused by using the wrong Nano bootloader setting, not by the CH340 driver or the selected programmer. For USB/CH340 uploads, the AVRISP mkII programmer choice is ignored because sketch upload goes through the bootloader over USB/UART, not ICSP [#17483770] Try the Nano "OLD" bootloader option first, since many clones still use the older 2 kB bootloader; the 30720-byte flash limit in your log matches that old bootloader [#17483770] If needed, you can also try selecting Uno instead of Nano to identify which bootloader variant the board actually has [#17483770] In the thread, switching the board setting to OLD solved the problem [#17487367]
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 17483115
    lighter1974
    Level 2  
    Posts: 3
    Hello
    When it comes to programming, I am "fresh" like in Arduino programming. I am asking for help in the following matter:
    Arduino Nano (clone CH340), Windows 7 system, driver installed, after connecting the system sees Arduino as USB-SERIAL CH340 (COM12).
    When trying to load a program (basic with a flashing LED) to Arduino using Arduino 1.8.7 after a long time displays the message: Problem with uploading to the board. "

    LEDs on Arduino:
    - L flashes every 3 seconds,
    - POW - steady on (power supply, as I presume ;) )
    - EX - not lit,
    - RX will "wink" in a period of approx. 1 sec. incomplete brightness for a few seconds and then silence
    Below is a description of the errors
    Arduino: 1.8.7 (Windows 7), Board: "Arduino Nano, ATmega328P"

    The sketch uses 930 bytes (3%) of program memory. The maximum is 30720 bytes.
    Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. The maximum is 2048 bytes.
    avrdude: stk500_recv (): programmer is not responding
    avrdude: stk500_getsync () attempt 1 of 10: not in sync: resp = 0xb2
    avrdude: stk500_recv (): programmer is not responding
    avrdude: stk500_getsync () attempt 2 of 10: not in sync: resp = 0xb2
    avrdude: stk500_recv (): programmer is not responding
    avrdude: stk500_getsync () attempt 3 of 10: not in sync: resp = 0xb2
    avrdude: stk500_recv (): programmer is not responding
    avrdude: stk500_getsync () attempt 4 of 10: not in sync: resp = 0xb2
    avrdude: stk500_recv (): programmer is not responding
    avrdude: stk500_getsync () attempt 5 of 10: not in sync: resp = 0xb2
    avrdude: stk500_recv (): programmer is not responding
    avrdude: stk500_getsync () attempt 6 of 10: not in sync: resp = 0xb2
    avrdude: stk500_recv (): programmer is not responding
    avrdude: stk500_getsync () attempt 7 of 10: not in sync: resp = 0xb2
    avrdude: stk500_recv (): programmer is not responding
    avrdude: stk500_getsync () attempt 8 of 10: not in sync: resp = 0xb2
    avrdude: stk500_recv (): programmer is not responding
    avrdude: stk500_getsync () attempt 9 of 10: not in sync: resp = 0xb2
    avrdude: stk500_recv (): programmer is not responding
    avrdude: stk500_getsync () attempt 10 of 10: not in sync: resp = 0xb2
    Problem with uploading to the plate.


    The driver is current, the board and processor selected are correct, the AVRISP mkII programmer.
    Am I doing something wrong? Should I burn the bootloader beforehand?
    I tried with the second board and the cable replaced - it's the same.
    Thank you in advance for your help.
  • ADVERTISEMENT
  • #2 17483209
    adamz74
    Level 33  
    Posts: 1276
    Help: 265
    Rate: 188
    Try pressing the reset button on the board for a moment.

    Pozdr!
  • #3 17483404
    lighter1974
    Level 2  
    Posts: 3
    Thanks, but nothing has changed; (
  • ADVERTISEMENT
  • #4 17483506
    Anonymous
    Level 1  
  • Helpful post
    #5 17483770
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #6 17487367
    lighter1974
    Level 2  
    Posts: 3
    [Quote = "emarcus"]
    Are you sure you have the correct options selected: ' board and processor selected are valid '? .
    Note that Nano / Clone may have a different bootloader than the original NANO (it may be 'old' standard (2k) or newer 'Opti' (512 bits).
    Try alternatively the latter option, because from your description it is not known what you have.
    Below you have the way to choose the settings, or try to choose UNO instead of NANO before compiling and trying to enter.


    After changing the tile to OLD it helped.
    Thank you so much for the tips and help.
  • #7 17488079
    Anonymous
    Level 1  
  • #9 17637026
    kaczakat
    Level 34  
    Posts: 1748
    Help: 317
    Rate: 229
    To upload a new bootloader to Arduino, the easiest way to use the clones of the USBASP programmer (troublesome in the Arduino IDE> 1.8.5, but there is information on the forum how to override AVRDUDE) or AVR ISP MKII. You can also make a programmer from another Arduino, description e.g. here: link and there are a lot of tutorials on Youtube, e.g .: link .
    Helpful post? Buy me a coffee.
  • #10 17637150
    Wlodek22
    Level 31  
    Posts: 1778
    Help: 78
    Rate: 519
    I have two identical nano clones and tried to upload via ISP, but I can't. Just like the first time you started without a variable on Old bootloader, the signature doesn't match. And no matter whether we choose the old or new bootloader, it always ends in error.
  • #11 17637291
    kaczakat
    Level 34  
    Posts: 1748
    Help: 317
    Rate: 229
    Either you have damaged equipment or you can't upload. Describe how you do it, assuming that I just landed on Earth and I have no idea how to do it, and you want to explain to me how, upload your error log (with full messages set in options), show the connection diagram you use, maybe someone will notice where do you make a mistake. As, for example, I used AVR LAB ++ with a programmer made on NANO, the only acceptable speed was 115200 (in the example sketch it is 19200). The AVRDUDE version from Arduino may also be a problem, you have to replace it with the one from AVR LAB ++ 2.4.
    Helpful post? Buy me a coffee.
  • #12 17637684
    Wlodek22
    Level 31  
    Posts: 1778
    Help: 78
    Rate: 519
    In the end I bought a USBasp programmer and uploaded it the first time.

    Thank you for your willingness to help.
  • ADVERTISEMENT
  • #14 17638384
    Wlodek22
    Level 31  
    Posts: 1778
    Help: 78
    Rate: 519
    He had one with the new bootloader, and I had both "left", probably because it was impossible to upload
  • #15 17638430
    kaczakat
    Level 34  
    Posts: 1748
    Help: 317
    Rate: 229
    The bootloder is invalid in this programming mode, the AVRDUDE version is important, the new one does not support Arduino ISP and USBASP, at least that was the case with me. After installing newer as USBASP does not work, replace AVR DUDE, I recommend the one with AVR LAB link , exe and configuration file in Arduino are in different directories. You can have more errors, the easiest way to invest is in USBASP. If you have an Arduino Micro, you can also do the MKII programmer described by me here: link , works in the new version of AVR DUDE without a problem and Atmel Studio 6 and 7.
    Helpful post? Buy me a coffee.
  • #16 17638738
    Wlodek22
    Level 31  
    Posts: 1778
    Help: 78
    Rate: 519
    I bought USBasp, connected the cables, in arduino I chose this programmer (USBasp) and it uploaded without problems. I did not install AVRDUDE and I see that I have avoided additional problems.
  • #17 17638743
    Anonymous
    Level 1  
  • #18 17638900
    Wlodek22
    Level 31  
    Posts: 1778
    Help: 78
    Rate: 519
    1.8.8 (Windows Store 1.8.19.0)
    Installed from the Microsoft Store
  • #20 17647080
    Wlodek22
    Level 31  
    Posts: 1778
    Help: 78
    Rate: 519
    Not having a clue about C ++, here's what I was able to engineer for two days, where I spent one and a half trying to read the wrong modbus register.
    It is a two-phase energy monitor based on the Chinese PZEM-016 on rs485. Made in FLprog program.
    Attachments:
    • Monitorenergii.zip (22.7 KB) You must be logged in to download this attachment.

Topic summary

✨ The discussion revolves around issues faced while uploading programs to an Arduino Nano clone (CH340) on a Windows 7 system using Arduino IDE 1.8.7. The user encounters an upload error despite having the correct driver installed and the board recognized as USB-SERIAL CH340 (COM12). Various suggestions are provided, including pressing the reset button, ensuring the correct board and processor settings, and considering the bootloader type (old vs. new). Users recommend using an AVR ISP programmer or USBasp for uploading a new bootloader, which can resolve the upload issues. Ultimately, the user successfully uploads the program after changing the bootloader settings and using a USBasp programmer.
Generated by the language model.

FAQ

TL;DR: To fix Nano CH340 upload errors, match the bootloader; 30720 vs 32256 bytes reveals “Old” vs “Opti,” and “the programmer selected … does not matter.” Select the correct board/processor or try UNO, then upload via USB/CH340 bootloader. [Elektroda, Anonymous, post #17483770]

Why it matters: This FAQ helps Windows users with CH340-based Arduino Nano clones quickly resolve avrdude sync errors without extra hardware.

Quick Facts

How do I fix “avrdude: stk500_getsync() not in sync” on a Nano CH340?

Most CH340 Nano clones ship with the Old bootloader. Select it, then upload again. How-To:
  1. Tools > Board: Arduino Nano.
  2. Tools > Processor: ATmega328P (Old Bootloader).
  3. Upload your sketch. This change immediately resolved the thread’s upload failure. [Elektroda, lighter1974, post #17487367]

What does that avrdude error actually mean?

It indicates the IDE cannot talk to the bootloader over USB/CH340. USB uploads use the UART bootloader, not an external ISP. The Programmer menu is ignored for serial uploads. Fix it by matching board/processor to the installed bootloader. “One of these options should work properly.” [Elektroda, Anonymous, post #17483770]

How can I tell if my Nano clone uses the Old or Opti bootloader?

Compile a sketch and read the console’s “Maximum” size. 30720 bytes means the Old bootloader. 32256 bytes means Opti. If unsure, try selecting UNO for a quick test because some clones use UNO-style OptiBoot. [Elektroda, Anonymous, post #17483770]

Does the IDE’s Programmer setting matter for USB uploads?

No. “The programmer selected in this method of communication does not matter.” It’s only used for ICSP (MISO/MOSI/SCK/RESET) programming. USB uploads go through the CH340 serial interface with the bootloader. [Elektroda, Anonymous, post #17483770]

Can selecting Arduino UNO make uploads succeed on a Nano clone?

Yes. Some Nano clones ship with UNO-style OptiBoot. Temporarily choose Board: Arduino UNO, compile, and try uploading. If it works, you’ve identified the bootloader behavior and can adjust Nano settings accordingly. [Elektroda, Anonymous, post #17483770]

What LED behavior might I see during a failed upload?

A reported case showed L flashing every 3 seconds, Power steady, “EX” off, and RX blinking about once per second for a few seconds, then silence. The IDE then repeated “programmer is not responding” and “not in sync: resp=0xb2.” [Elektroda, lighter1974, post #17483115]

What benefits do I get from flashing the Opti bootloader?

Uploads run at 115200 baud instead of 57600, and you gain about 1.5 KB of flash space. One expert noted it yields a “fully-stable” UNO-like experience and “much faster in programming; 115200 baud instead of 57600.” [Elektroda, Anonymous, post #17488079]

What’s the easiest way to burn a new bootloader onto a Nano clone?

Use a USBasp or AVR ISP MKII programmer. You can also turn another Arduino into an ISP. Tutorials are widely available; USBasp is often the most straightforward path in Arduino IDE. [Elektroda, kaczakat, post #17637026]

Arduino as ISP gives “signature doesn’t match.” What should I check?

It can be wiring, tool settings, or hardware faults. Share full verbose logs and your wiring. With AVR LAB++ as host, 115200 was the only stable speed for a Nano-based programmer. Replacing the Arduino-bundled avrdude with AVR LAB++ 2.4 also helped. [Elektroda, kaczakat, post #17637291]

USBasp worked first try—do I need anything else installed?

Not necessarily. One user chose Programmer: USBasp in Arduino IDE and burned the bootloader immediately, without installing a separate avrdude. That simplified setup and avoided extra issues. [Elektroda, Wlodek22, post #17638738]

Which Arduino IDE version worked with USBasp in this thread?

Arduino IDE 1.8.8 (Windows Store 1.8.19.0) successfully worked with USBasp for the user who flashed the bootloader. [Elektroda, Wlodek22, post #17638900]

I selected “AVRISP” (not mkII) and serial upload still worked—why?

A user reported uploading to a Nano via CH340 with Programmer set to “AVRISP” (not mkII). This selection did not block serial bootloader uploading in their case. [Elektroda, khoam, post #17483506]

Do I need to burn a bootloader before uploading over USB?

No. USB/CH340 uploads use the existing bootloader. Burn a bootloader only if it’s missing/corrupt or if you want to switch between Old and Opti for speed and flash gains. [Elektroda, Anonymous, post #17483770]
Generated by the language model.
ADVERTISEMENT