Arduino CH340 on Windows: Fix the Specific Can’t Set COM-State Error

This Arduino upload error can occur with particular CH340-equipped boards and driver versions. A missing COM port or a compilation failure has a different cause.
Match the exact upload error
Copy the exact error from the upload output. In Device Manager open the returning serial device and check its driver provider and version. Confirm that the board uses a CH340 bridge before applying Arduino’s workaround.
What to do next
Follow Arduino’s Windows instructions for the affected driver combination, including its documented rollback procedure when applicable. Avoid changing the driver on unrelated serial adapters. Recheck the selected board and port in the IDE.
Test one known-good sketch
Upload a small known-good sketch appropriate for that board. If the error has changed, diagnose the new message. Record the working driver version for that particular board.
See the manufacturer’s reference for model-specific details. You can also identify functions on a USB device.