我有 Nucleo STM32H743ZI 板。我正在使用 CubeMX HAL(我尝试了多个版本)和 TrueStudio。Windows 10 中出现“虚拟 COM 端口”(我尝试了默认的 Windows 驱动程序和 ST 驱动程序)但我无法打开端口。当我尝试打开它时,我的 C# 程序写给我“参数不正确”:
SerialPort port = new SerialPort("COM8", 9600, Parity.None, 8, StopBits.One);
port.Open(); // System.IO.IOException: 'The parameter is incorrect.'
Run Code Online (Sandbox Code Playgroud)
同样的消息给我写了 Realterm 程序,PuTTY 什么也不做,“Tera Term”程序工作正常 - 我可以向我的 MCU 程序发送和接收数据。
有谁知道它是什么?
在我的 C# 程序和终端程序中,我使用相同的参数
USB 设备查看器信息:
[Port1] : STMicroelectronics Virtual COM Port
Is Port User Connectable: yes
Is Port Debug Capable: no
Companion Port Number: 17
Companion Hub Symbolic Link Name: USB#ROOT_HUB30#4&2f29167c&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
Protocols Supported:
USB 1.1: yes
USB …Run Code Online (Sandbox Code Playgroud)