Go Down

Topic: CH340 Arduino clone crashes computer(!) with fanfare (Read 515 times) previous topic - next topic

obskyr

I haven't seen anyone else talk about this online, so I figure I should be the one to do so: the Windows driver for CH340, the USB-to-serial chipset commonly used in Arduino clones, predictably causes bluescreens.

While a CH340 Arduino clone is connected to the computer, trying to enter sleep mode (i.e. pressing the power button on my laptop, in my case) causes the computer to start but never actually finish entering sleep mode, and eventually crash with the bluescreen "DRIVER_POWER_STATE_FAILURE" - an error that apparently indicates that a driver didn't respond to the power state change properly. This only occurs when the device is connected, like clockwork, using the latest version (3.4) of the official driver from what seems to be the chip manufacturer's website. In my testing, I've found this to be consistently reproducible! :o

My specific setup is an Arduino Nano clone using a CH340G on Windows 10, although I suspect the issue affects CH340/CH341 devices on Windows in general.

If you have a laptop and a CH340 Arduino clone: can you also reproduce this issue, or is it just my setup? My guess is that the driver simply isn't written to accommodate sleep mode, and thus halts and catches fire when asked to suspend itself. If so, the only solutions would be for the Chinese company behind it to release a new version that fixes the issue (probably unlikely) or for someone to write a new driver and get a code signing certificate for it (would be wonderful, but even more unlikely).

Mayzz

I have the same problem since many months... CH340 was probably not designed to be permanently connected to a PC but only to serve as a temporary interface for data tranfer like arduinos. The only solution I found to overcome this is to use an FTDI232.

DrAzzy

I have multiple win10 systems and dozens of ch340g adapters. Never had a problem. I often sleep the computer with them plugged in.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Erik_Baas

While a CH340 Arduino clone is connected to the computer, trying to enter sleep mode causes the computer to start but never actually finish entering sleep mode, and eventually crash with the bluescreen "DRIVER_POWER_STATE_FAILURE"
The same thing happens here on Windows 7: when I want Windows to shut down it takes 10 minutes or so before I see a BSOD, and then the PC reboots (!). The only solution I could fnd is just disconnecting the USB connector...

DRIVER_POWER_STATE_FAILURE
STOP: 0x0000009F

ballscrewbob

#4
Aug 26, 2019, 04:10 am Last Edit: Aug 26, 2019, 04:11 am by ballscrewbob
Hi Eric.

If you don't have anything plugged in at all does it still take a while to shut down ?
If it does i suspect something other than the Arduino is at fault.

If it just and only just the Arduino that causes it then you might want to check your power savings settings as I think there may be a slight mis-match in there.

Anyone else that sees this particular issue can you also state if you are using USB 2.0 or 3.0 ports or cables to your Arduino.
USB 3.0 has been seen to cause Arduino issues so should be ruled out by using USB 2.0  ports or another computer with USB 2.0 where available.

Also there have been recent reports of a windows hardware update to windows 10 also causing USB and Arduino issues. Quickest fix is to roll back that particular update and then tell windows to hide it. OR alternately go to your motherboard / laptop makers site and get any driver updates from there rather than trust the Microsoft ones.

Bob.



It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Erik_Baas

Bob,

Usually nothing is plugged in to any USB port when I shut down the PC. But I just checked what happens when a camera, smartphone, printer, USB stick and/or DVB-T stick is connected, and in all those cases the PC just shuts down as fast as always.

I tried connecting the Arduino to an USB-1 port (from the mainboard) as well as an USB-2 port (from an extension board), that does not make any difference: after closing Windows it "hangs" for over 10 minutes, and then shows the BSOD. I have no USB-3 ports.

About my power savings settings: none at all.

BTW: I'm runnng Windows 7, so it's not the Windows 10 update.

If I can fix my old laptop I'll test what happens on Windows 2000, but for now I suspect the CH340 driver...

ballscrewbob

Running WIN 7 PRO x 64 here and don't see those delays in any form.

That you have USB 1.0 would indicate very old hardware ?

Power savings can involve more than just those you can see easily.
Some parts of the hardware can have thier own individual settings too and you may also want to check those.
More so any USB and NETWORK settings.

If the hardware is as old as I suspect also check any power and speed settings in the BIOS !

The CH340/341 driver tested here on XP, VISTA, 7 x64, 8 x64, 10 x64 all perform without shutdown delays.

A few more helps and hints courtesy of google

Bob.



It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Erik_Baas

My hardware is only four years old, so... yes, I guess it is very old...  ;-)

ballscrewbob

I really dont know of any hardware 4 years old that has USB 1.0 !

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Go Up