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

Frequent reading and writing of the serial port causes a blue screen in the window #197

Open
4 tasks done
jinronga opened this issue Jan 14, 2025 · 1 comment
Open
4 tasks done
Labels

Comments

@jinronga
Copy link

Describe the problem

Frequent reading and writing of the serial port causes a blue screen in the window
微信图片_20250114181437

To reproduce

Port interface:
// Stores data received from the serial port into the provided byte array
// buffer. The function returns the number of bytes read.
//
// The Read function blocks until (at least) one byte is received from
// the serial port or an error occurs.
Read(p []byte) (n int, err error)

// Send the content of the data byte array to the serial port.
// Returns the number of bytes written.
Write(p []byte) (n int, err error)

Please double-check that you have reported each of the following

before submitting the issue.

  • I've provided the FULL source code that causes the problem
  • I've provided all the actions required to reproduce the problem

Expected behavior

微信图片_20250114181437

Operating system and version

window11

Please describe your hardware setup

微信图片_20250114181437

Additional context

微信图片_20250114181437

Issue checklist

  • I searched for previous requests in the issue tracker
  • My request contains all necessary details
@jinronga jinronga added the bug label Jan 14, 2025
@per1234
Copy link

per1234 commented Jan 14, 2025

Thanks for your report @jinronga!

Please provide the source code of a complete minimal Go program that produces the BSoD.

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

  1. Connect the device that produces the serial port you are using when the fault occurs to your computer.
  2. Open the Windows Device Manager.
  3. Select View > Devices by type from the Device Manager menus.
  4. Open the "View" menu.
  5. If there is a to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
  6. Open the "Ports (COM & LPT)" section of the Device Manager tree.
  7. 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.
  8. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants