CH340 driver keeps resetting arduino without serial monitor/plotter opened

Hi,
while I've been working on a project, I noticed arduino keeps resetting in constant interval (20-30 seconds).

Thinking about array overflows, interrupts timing, over current, ....
I've found out it's not resetting while serial monitor (or plotter) runs in IDE.

It probably started approximately at the same time, I started using also Arduino IDE 2.0 (downloaded just as .zip file for Windows, but it installed some drivers at first run), but I'm not sure (before that, I was using serial monitor constantly for quite a while, so I didn't have chance to notice it).

So I tied to reinstall drivers for ch340 chip and I noticed, when the driver is uninstalled, arduino isn't resetting, it runs correctly.

When I installed the driver again (I tried the newest version and also older versions), arduino starts resetting again. As before, when I start serial monitor, it starts working properly.

This behavior isn't dependent on using Serial in the code.

So I came to conclusion, that the problem is probably in the ch340 driver.

Did anyone have similar issue?
Any idea how can I fix this?

Thanks for help or any recommendation.

what exactly did you observe that led you to think its resetting? Could it just be acting chaotically?

need more info. post the code, tell us what board your running.

Are you able to upload without issue?

Have you tried another board on the same system?

Have you tried the same board on a different system?

resetting → because onboard LED blinks the "reset sequence"
code → any code you can think of
board → Arduino nano v3
uploading → no problem
different board with ch340 on same PC → also resets
same board with ch340 on different PC → doesn't reset

I'm advanced embedded C programmer, but random windows driver thinks are not my cup of tee.
Thanks for any advice.

sorry I didnt mean to insult your intelligence, its hard to know everyone's ability level. I assume you've also tried various usb ports on the machine in question?

one more point of clarification, in all you test cases, was power coming from usb? Might try an external power supply & see if it still resets. thats not a fix, but information.

Its just so odd that the ch340 seems to be functioning...upload, serial com, ect. but all indications do point to the drivers.

I see no reason this should change anything, but its windows, so....have you tried a different ide? Following your hunch that 2.0 may have started the problems, maybe its in the IDE itself? If you're an advanced programmer, you probably should check out PIO. I'm not an advanced programmer & its simple enough for me to use with all the features you'd expect from a c compiler/ide.

perplexing problem...I've got a bunch of soldering to do tonight, I'll let this roll around in my head & see if I dont have more useful suggestions later.

Arduino board resets with USB power, also with battery power. It happens with all USB ports, resetting (every ~13 sek).
Of coarse I use PlatformIO, but for some simple stuff I sometimes use just simple Arduino IDE.
But this problem is not in IDE, it's in computer :frowning:, simply speaking:

Any non CH340 board in any conditions → working
Board with CH340, no IDE running → resetting
Board with CH340, any IDE running (Ard., Ard.2.0, PIO(VScode)) → resetting
Board with CH340, any IDE running with opened serial monitor/plotter window (even when not using Serial in code at all) → working
Board with CH340, any IDE running with after closing serial monitor/plotter window → resetting
Board with CH340, UNinstalled ch340 driver → "working" (no communication, but not resetting :upside_down_face:)

I tried resetting COM ports using registry, installing older versions of ch341 driver, reinstalling IDEs ... nothing worked. :slightly_frowning_face:

damn, that must be frustrating. With the amount of time you spent thoroughly testing options, you could have just done a clean windows install. You seem quiet capable, I know its a PINTA, but have you considered that an option?

maybe you answered this, did you pull arduino2.0 from your system? Seems like you thought its installation snuck in a driver?

does that PC have arduino 2.0 on it?

Just trying to narrow the search to what's different between the two PCs. If we think A2.0 did it, I have a box here I wouldn't mind trying it on. What OS are you running (i know you said windows, but what version?)

I've seen some very odd stuff through serial/usb, but this, as the kids say, is "cray-cray".

I would prefer to not reinstall windows.
The other PC doesn't have Arduino IDE 2.0 and both PCs use windows 10.
And I didn't "installed" A2.0 (using .exe/.msi), just downloaded .zip file. During first run, it installed some drivers and other stuff automatically and I think there's no "uninstaller" for those additional things.

I'm having exactly the same issue as reported by 1_r630_1. It affects the Arduino Nano with the CH340 chip. (I had no issues with an Arduino Mega on the same USB port .)
I noticed that the reset problem occurs only when the COM port is closed. There are no issues while the COM port is kept open by whatever serial communication software is being used to communicate with the Nano.

Hi - all I have just inherited the same problem as the OP and fmendes13.

I am using an Arduino UNO with CH340 interfaced to a SIM900 GSM module doing a HTTP Post request to my PI. Am using Win10
All worked ok for several weeks.
All I did was leave it off for a day or so and power it up again. I realized that as long as I have a serial monitor open (Or Realtem for that matter), then all is well. Otherwise the program reaches a point in the code and then restarts (resets?). If I power the UNO via an independent PSU (e.g. phone charger) then all is well. I have never seen this before.
I tried uninstalling the CH#340 and restarted Windows - no joy
(I wonder if a windows update did anything to cause this??)

Edit: perhaps this this link sheds light:
regards
Russell

Hello all,
did you found a solution for this?
We have some similar problems with Nanos and CH340 Chip.
Sometimes I got the state with frequently resets every ~10sec without any open program.
Additional I can not connect to the Nano with the PlatformIO terminal program or our own program to communicate via serial connection. Using Putty as terminal program does work.
Once I tried the terminal from PlatformIO again, Putty can not set the Baud rate to 115200 Baud anymore, any other below is working (even 115119).
After unplugging and plugging the Nano it does work again with Putty, but never with the other programs.
All is with the latest driver Version (3.8) from wcn, with the latest Windows driver even Putty does not work anymore.
This Nano was working a few less weeks ago.

Regards
Ralf

Hi @elral. There has been a recent spike of reports of strange problems related to the ports of boards using the CH340. The reported symptoms have not included resetting, so I'm not sure your issue is the same, but I'm at least suspicious it might be.

Some users have reported that they determined the cause of their problem was a Windows update that included an update for the CH340 driver:

There are several reports of people solving the problem by installing drivers obtained from various 3rd party sources. Since I think it is risky to install drivers obtained from any source other than the chip manufacturer (WCH in this case), I have been suggesting an alternative possible solution of using Windows Device Manager to do an uninstall/reinstall cycle of the device. The two users who tried that technique reported it fixed the problem they were having with their CH340 boards, so it is worth a try at least. I'll provide instructions you can follow:

  1. Close any applications that might connect to the port of the Nano (e.g., PuTTY).
  2. Connect the Arduino board to your computer with a USB cable.
  3. Open the Windows Device Manager.
  4. Select View > Devices by type from the Device Manager menus.
  5. Open the "View" menu.
  6. If there is a to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
  7. Open the "Ports (COM & LPT)" section of the Device Manager tree.
  8. You should see a port identified as "USB-SERIAL CH340 (COM_n_)" under the "Ports (COM & LPT)" section (where "COM_n_" is some serial port e.g., COM4). Right click on that item.
    A context menu will open.
  9. Select "Uninstall device" from the context menu.
    An "Uninstall Device" dialog will open.
  10. Check the box next to "☐ Attempt to remove the driver for this device" in the "Uninstall Device" dialog.
  11. Click the "Uninstall" button.
  12. Wait for the uninstallation process to finish.
  13. Unplug the USB cable of the Arduino board from your computer.
  14. Wait for the Device Manager tree to reload.
  15. Connect the USB cable of the Arduino board to your computer.
  16. Wait for the "USB-SERIAL CH340 (COM_n_)" port to reappear under the "Ports (COM & LPT)" section of the Device Manager tree.

My experience is that the device will be reinstalled automatically by Windows. However, it is maybe possible that the complete driver removal will actually have been accomplished by the above instructions, in which case it will be necessary to reinstall the driver. If this happens to you, please let me know and I'll provide instructions for installing the driver.

Once the port has reappeared in Device Manager, check to see whether the problem still occurs.

Hi ptillisch,
thanks very much for your detailed instructions. Unfortenutely this didn't helped.

But after rolling back the driver to 3.5.2019.1 from 30.01.2019 like mentioned in the ESP8266 Port Monitor Error thread everything is running fine again.

Regards

Ralf

2 Likes

Thanks for taking the time to post an update! I'm sorry my instructions weren't of any benefit, but I'm glad you were able to find a solution after all.

Would you mind describing how you did that roll back? I would like to understand the procedure so that I might use it to provide assistance to others who are experiencing problems caused by a driver update.

I tried the procedure described here, but the "Roll Back Driver" button is disabled in my dialog:

image

I had to install the driver linked in the ESP8266 Thread.
Downlaod the zip file, unzip it and execute the setup.exe. If the driver in the device manager is still listed as the new one from 2023, the button "roll back driver" is active and you can press them.

This has to be done again if the Nano gets plugged in into another USB port and gets another COM port number.
Not sure what happens if more than one Nano is plugged in.

Thanks again for your support. It might be that a link to this thread from our project to get this solved.

Thanks for sharing that information @elral!

I had simmiliar problem with CH340 NANO in Windows 11 and fresh install Arduino
( hardware NANO is OK normally works on old laptop Win10)

WIN11 problem Solved in 2 steps:

My problems partially solve "administrator trick" - can program NANO - but can not use port monitor or serial plot, After install CH340 old driver = >> all works fine

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