Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluescreen of Death when board prints continuously to Serial Monitor #2592

Open
3 tasks done
Joko-1 opened this issue Dec 5, 2024 · 16 comments
Open
3 tasks done

Bluescreen of Death when board prints continuously to Serial Monitor #2592

Joko-1 opened this issue Dec 5, 2024 · 16 comments
Labels
os: windows Specific to Windows operating system topic: serial monitor Related to the Serial Monitor type: imperfection Perceived defect in any part of project

Comments

@Joko-1
Copy link

Joko-1 commented Dec 5, 2024

Describe the problem

A Bluescreen of Death occurs after about 30 seconds when the board is running a sketch program that causes continuous printing to Serial Monitor:

Image

To reproduce

  1. Upload a sketch that causes the board to print continuously to Serial:
    void setup() {
      Serial.begin(9600);
    }
    
    void loop() {
      Serial.println("hello");
      delay(5);
    }
  2. Open Serial Monitor

🐛 A BSOD occurs a few minutes

Expected behavior

No BSOD

Arduino IDE version

2.3.4

Operating system

Windows

Operating system version

10 22H2

Additional context

The fault does not occur when I open the serial port of the board in PuTTY.


Board: ESP32-WROOM-32 with CH340 Serial chip


The message on the BSoD says:

Stillstandcode: DRIVER_IRQL_NOT_LESS_OR_EQUAL
Fehlerursache: CH341S64.SYS

or when Windows is configured for an English language locale:

Stop code: DRIVER_IRQL_NOT_LESS_OR_EQUAL
What failed: CH341S64.SYS

The BSoD occurs sooner if the baud rate is changed from 9600 (as used in the demo sketch) to 115200 baud.


I have attempted the following to solve the problem, without any success:

  • Reinstalling the CH340 driver
  • Updating from Arduino IDE 2.3.3 to 2.3.4
  • Using another cable
  • Using another Arduino sketch

Additional reports

Related

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@Joko-1 Joko-1 added the type: imperfection Perceived defect in any part of project label Dec 5, 2024
@per1234 per1234 changed the title Bluescreen of Death with Serial Monitor Bluescreen of Death when board prints continuously to Serial Monitor Dec 5, 2024
@per1234
Copy link
Contributor

per1234 commented Dec 5, 2024

Hi @Joko-1. Thanks for your report. I'm going to ask you to provide some additional information:

Please tell me which version of the CH340 driver you have installed. You can find this information by the following procedure:

  1. Open the Windows Device Manager.
  2. Select View > Devices by type from the Device Manager menus.
  3. Open the "View" menu.
  4. If there is a to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
  5. Open the "Ports (COM & LPT)" section of the Device Manager tree.
  6. You should see a port identified as "USB-SERIAL CH340 (COMn)" under the "Ports (COM & LPT)" section (where "COMn" is some serial port e.g., COM4). Double click on that item.
    The "USB-SERIAL CH340 (COMn) Properties" dialog will open.
  7. Select the "Driver" tab of the "USB-SERIAL CH340 (COMn) Properties" dialog.

You will see the version in the "Driver Version" field of the dialog.


Please also tell me whether there is labeling on the CH340 chip on your board. If present, the labeling would look something like this:

WCH CH340 IC

📷

SparkFun - CC BY-SA 4.0 (cropped)

But the chip might also be blank:

Unlabeled SOIC-16 IC

📷

NodeMCU Lua Lol1n V3.jpg by Popolon - CC BY-SA 4.0 (cropped)

@per1234 per1234 added the status: waiting for information More information must be provided before work can proceed label Dec 5, 2024
@per1234 per1234 self-assigned this Dec 5, 2024
@Joko-1
Copy link
Author

Joko-1 commented Dec 5, 2024

Thanks for respond,

Driver:
Driver Provider: wch.cn
Driver Date: 16.09.2024
Driver Version: 3.9.2024.9

Chip:
WCH
CH340C
205695D41

@per1234 per1234 removed the status: waiting for information More information must be provided before work can proceed label Dec 6, 2024
@per1234 per1234 removed their assignment Dec 6, 2024
@KashifKhaan

This comment has been minimized.

@AkhmadKhoirudin

This comment has been minimized.

@bankdaysun
Copy link

After this issue occurred, I tried to fix it by installing the old 2011 driver
Image
Select "Older Windows Driver Version and Instructions"
https://sparks.gogo.co.nz/ch340.html?srsltid=AfmBOorOaQq3i3DrMbWlf7fW4zSXS1gbigIbjYHjBQ3w1P91_VicE93r
It worked fine and stopped the BSOD
Device: ESP32 Dev module CH340
date:9/12/2024

@per1234
Copy link
Contributor

per1234 commented Jan 6, 2025

Thanks for sharing this valuable information @bankdaysun! This indicates that the problem is in the latest version of the CH340 driver, and not in Arduino IDE.

Did you find that the problem came back later? I ask because in my experience Windows will automatically update the driver to the problematic version once again after some time.

@per1234 per1234 added topic: serial monitor Related to the Serial Monitor os: windows Specific to Windows operating system labels Jan 6, 2025
@per1234
Copy link
Contributor

per1234 commented Jan 7, 2025

Hi @Joko-1. I will provide instructions you can follow to install an older version of the driver. Hopefully the problem will not occur when that older version is used, as was reported by @bankdaysun.

Unfortunately I am not able to reproduce the fault on a Windows 10 virtual machine, or on a Windows 11 physical machine (I don't have a Windows 10 physical machine) by running the "hello" sketch on my ESP32-CAM board (which has a CH340 chip) with the problematic 3.9.2024.9 version of the driver installed. So I am not able to personally verify that this workaround will fix the problem.

  1. Click the following link to download the previous version of the driver from the chip manufacturer's website:
    https://www.wch-ic.com/downloads/file/65.html?time=2023-03-16%2022:57:59
  2. Wait for the download to finish.
  3. Run the downloaded CH341SER.EXE file.
  4. A "User Account Control" dialog may now appear asking "Do you want to allow this app to make changes to your device?". Click the "Yes" button.
  5. A "DriverSetup(X64)" dialog will open. Click the "INSTALL" button in the dialog.
  6. Wait for the driver installation to finish, as indicated by the appearance of a "Driver install success!" dialog.
  7. Click the "OK" button in the "Driver install success!" dialog.
    The dialog will close.
  8. Click the X icon at the top right of the "DriverSetup(X64)" dialog
    The dialog will close.
  9. Close Arduino IDE if it is running.
  10. Connect the Arduino board to your computer with a USB cable.
  11. Open the Windows Device Manager.
  12. Select View > Devices by type from the Device Manager menus.
  13. Open the "View" menu.
  14. If there is a to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
  15. Open the "Ports (COM & LPT)" section of the Device Manager tree.
  16. You should see a port identified as "USB-SERIAL CH340 (COMn)" under the "Ports (COM & LPT)" section (where "COMn" is some serial port e.g., COM4). Double click on that item.
    The "USB-SERIAL CH340 (COMn) Properties" dialog will open.
  17. Select the "Driver" tab of the "USB-SERIAL CH340 (COMn) Properties" dialog.
  18. You will see a "Roll Back Driver" button in the dialog. If it is not clickable, perform the following instructions:
    1. Click the "Update driver" button.
      An "Update Drivers Device - USB-SERIAL CH340 (COMn)" dialog will open.
    2. Click on "Search automatically for drivers" in the "Update Drivers Device - USB-SERIAL CH340 (COMn)" dialog.
    3. You should now see the driver installation wizard update the driver. Wait for the update to finish, as indicated by the message "Windows has successfully updated your drivers" in the dialog.
      ❗ It is possible you will instead see the message "The best drivers are already installed". If so, please stop following the instructions here and comment on the issue to let me know. I'll provide alternative instructions you can follow.
    4. Click the "Close" button in the "Update Drivers Device - USB-SERIAL CH340 (COMn)" dialog.
      The dialog will close.
  19. Click the "Roll Back Driver" button in the "USB-SERIAL CH340 (COMn) Properties" dialog.
    The "Driver Package rollback" dialog will open.
  20. Click the radio button next to "My apps don't work with this driver" in the "Driver Package rollback" dialog .
  21. Click the "Yes" button.
    The "Driver Package rollback" dialog will close.
  22. Click the "Close" button in the "USB-SERIAL CH340 (COMn) Properties" dialog.

Now start Arduino IDE again, upload the "hello" test sketch to your board. Hopefully it will no longer cause a BSoD.

When you perform the special "roll back" procedure per the instructions I provided above, Windows is smart enough to understand that it should not later update the driver to the problematic version 3.9.2024.9 again. So this fix should be persistent (until such time as WCH releases a new version of the driver, which historically they have only done every year or two, and hopefully might contain a fix anyway).

@william-orange
Copy link

I have experienced the same problem as described here. Going one version back on the serial driver did not help. Slowing the baud rate to 9600 did not help. I am presently using Putty for serial monitoring.

@per1234
Copy link
Contributor

per1234 commented Jan 13, 2025

Thanks for your report @william-orange. Which operating system are you using (e.g., "Windows 10")?

Which USB to serial chip does the board you are using have (e.g., "CH340")?

I am presently using Putty for serial monitoring.

Does the BSoD also occur when using PuTTY, or does it only occur when using the Arduino IDE Serial Monitor?

@william-orange
Copy link

william-orange commented Jan 13, 2025

I am using a variant of the Cheap Yellow Display. I examined the serial chip with my jewler's lup. Nothing is legible. I believe it is a CH340 but I can not confirm it.

I am running windows 11 24h2 and the latest Arduini IDE release.

The BSoD does not occure when using Putty. I have let it run hours to be sure.

Here's a sample from BlueScreenView.

011025-12734-01.dmp	1/10/2025 3:32:02 PM	DRIVER_IRQL_NOT_LESS_OR_EQUAL	0x000000d1	00000000`00000038	00000000`00000002	00000000`00000000	fffff801`a77e48a1	CH341S64.SYS	CH341S64.SYS+48a1	WDM for CH341 serial, by W.ch	CH341S64.SYS	wch.cn	3.90	x64	ntoskrnl.exe+4b85d0					C:\WINDOWS\Minidump\011025-12734-01.dmp	16	15	26100	3,215,461	1/10/2025 3:32:33 PM	
011025-12671-01.dmp	1/10/2025 3:09:46 PM	DRIVER_IRQL_NOT_LESS_OR_EQUAL	0x000000d1	00000000`00000038	00000000`00000002	00000000`00000000	fffff800`d5c248a1	CH341S64.SYS	CH341S64.SYS+48a1	WDM for CH341 serial, by W.ch	CH341S64.SYS	wch.cn	3.90	x64	ntoskrnl.exe+4b85d0					C:\WINDOWS\Minidump\011025-12671-01.dmp	16	15	26100	3,426,821	1/10/2025 3:10:17 PM	

@jtnorr

This comment has been minimized.

@nbourre

This comment has been minimized.

@Wicz3k

This comment has been minimized.

@alexew0923
Copy link

alexew0923 commented Mar 6, 2025

   ❗ It is possible you will instead see the message "**The best drivers are already installed**". If so, please stop following the instructions here and comment on the issue to let me know. I'll provide alternative instructions you can follow.

My laptop's device manager says like this, what should I do now?
I am currently using PuTTY as serial monitor like mentioned above because of BSoD.

@per1234
Copy link
Contributor

per1234 commented Mar 6, 2025

Hi @alexew0923. I have found that when the driver installation gets into this state, it can be solved by uninstalling and then reinstalling the drivers. After that, the "roll back" option should be enabled.

I'll provide instructions you can follow to do that:

  1. Close Arduino IDE if it is running.
  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 (COMn)" under the "Ports (COM & LPT)" section (where "COMn" is some serial port e.g., COM4). Double click on that item.
    The "USB-SERIAL CH340 (COMn) Properties" dialog will open.
  9. Select the "Driver" tab of the "USB-SERIAL CH340 (COMn) Properties" dialog.
  10. Click the "Uninstall Device" button.
    The "Uninstall Device" dialog will open.
  11. Check the box next to "☐ Attempt to remove the driver for this device.".
  12. Click the "Uninstall" button.
    The "Uninstall Device" and "USB-SERIAL CH340 (COMn) Properties" dialogs will close.
  13. Disconnect the USB cable of the Arduino board from your computer.
  14. Reconnect the USB cable of the Arduino board to your computer.
  15. Wait for the "USB-SERIAL CH340 (COMn)" device to appear under the "Ports (COM & LPT)" section of the Device Manager tree.
    ❗ This will take a couple of minutes as Windows must first automatically reinstall the driver.
    ❗ It might appear first as a "USB2.0-Serial" device under the "Other devices section of the tree. Just wait for a little longer and it will appear in its final place under the "Ports (COM & LPT)" section.
  16. Click the following link to download the previous version of the driver from the chip manufacturer's website:
    https://www.wch-ic.com/downloads/file/65.html?time=2023-03-16%2022:57:59
  17. Wait for the download to finish.
  18. Run the downloaded CH341SER.EXE file.
  19. A "User Account Control" dialog may now appear asking "Do you want to allow this app to make changes to your device?". Click the "Yes" button.
  20. A "DriverSetup(X64)" dialog will open. Click the "INSTALL" button in the dialog.
  21. Wait for the driver installation to finish, as indicated by the appearance of a "Driver install success!" dialog.
  22. Click the "OK" button in the "Driver install success!" dialog.
    The dialog will close.
  23. Click the X icon at the top right of the "DriverSetup(X64)" dialog.
    The dialog will close.
  24. Switch back to the Windows "Device Manager".
  25. Double click on the "USB-SERIAL CH340 (COMn)" device under the "Ports (COM & LPT)" section.
    The "USB-SERIAL CH340 (COMn) Properties" dialog will open.
  26. Select the "Driver" tab of the "USB-SERIAL CH340 (COMn) Properties" dialog.
  27. Click the "Update driver" button.
    An "Update Drivers Device - USB-SERIAL CH340 (COMn)" dialog will open.
  28. Click on "Search automatically for drivers" in the "Update Drivers Device - USB-SERIAL CH340 (COMn)" dialog.
  29. You should now see the driver installation wizard update the driver. Wait for the update to finish, as indicated by the message "Windows has successfully updated your drivers" in the dialog.
  30. Click the "Close" button in the "Update Drivers Device - USB-SERIAL CH340 (COMn)" dialog.
    The dialog will close.
  31. Click the "Roll Back Driver" button in the "USB-SERIAL CH340 (COMn) Properties" dialog.
    The "Driver Package rollback" dialog will open.
  32. Click the radio button next to "My apps don't work with this driver" in the "Driver Package rollback" dialog .
  33. Click the "Yes" button.
    The "Driver Package rollback" dialog will close.
  34. Click the "Close" button in the "USB-SERIAL CH340 (COMn) Properties" dialog.

Now start Arduino IDE again and upload the "hello" test sketch to your board. Hopefully it will no longer cause a BSoD.

@alexew0923
Copy link

@per1234 I could fix the problem by following your steps, thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os: windows Specific to Windows operating system topic: serial monitor Related to the Serial Monitor type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

10 participants