Was your board running the sketch from post #1 at the time the BSoD occurred? Or was it running a different sketch? I ask because the bug I am thinking of only occurs when a large amount of data is printed to the Arduino IDE Serial Monitor, but that sketch doesn't produce any on the USB serial port (though the ESP32 can still sometimes produce debugging serial output even when the sketch code doesn't).
Hello again @mehmet_ozi. A potential fix has been made in the serial-monitor helper tool that provides communication between the Arduino IDE Serial Monitor tool and the serial port of the Arduino board:
Arduino IDE automatically updates the serial-monitor when a new version is available, so the version with the fix (0.15.0) should already be installed on your computer and in use by Arduino IDE.
I already verified that the change another problem that affected boards with the CH340 chip (arduino/arduino-create-agent#1000). However, I was never able to reproduce the problem reported here, so I am not able to check whether it is fixed or not.
Please check to see if the problem occurs when using the latest driver version and then add a reply here on the forum topic to let me know what you found.
I'll provide instructions you can follow to do that:
Connect the Arduino board to your computer with a USB cable.
Select View > Devices by type from the Device Manager menus.
Open the "View" menu.
If there is a ✓ to the left of the "Show hidden devices" menu item, click on "Show hidden devices" to disable it.
Open the "Ports (COM & LPT)" section of the Device Manager tree.
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.
Select the "Driver" tab of the "USB-SERIAL CH340 (COMn) Properties" dialog.
Click the "Update driver" button.
An "Update Drivers Device - USB-SERIAL CH340 (COMn)" dialog will open.
Click on "Search automatically for drivers" in the "Update Drivers Device - USB-SERIAL CH340 (COMn)" dialog.
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.
Click the "Close" button in the "USB-SERIAL CH340 (COMn) Properties" dialog.
Close Windows Device Manager.
Save any unsaved work that might be present in your open applications to ensure you won't lose anything if a BSoD does occur.