在Windows 10中使用RPi3 UART将串行停止位计数设置为2

时间:2016-06-24 15:42:19

标签: uart c++-cx raspberry-pi3 windowsiot

我想在Raspberry Pi 3上用2位停止(在UWP应用程序中)控制我的串行设置以控制DMX512。我的应用程序正在运行,它可以使用外部FTDI,但不能使用Raspberry Pi中的UART ...当执行带有停止位参数的行时,出现“参数不正确”错误。

        _serialPort->WriteTimeout = _timeOut;
        _serialPort->ReadTimeout = _timeOut;
        _serialPort->BaudRate = 250000;
        _serialPort->Parity = Windows::Devices::SerialCommunication::SerialParity::None;
        _serialPort->DataBits = 8;
        _serialPort->StopBits = Windows::Devices::SerialCommunication::SerialStopBitCount::Two;
        _serialPort->Handshake = Windows::Devices::SerialCommunication::SerialHandshake::None;

使用Linux,我知道RPi3的UART支持2个停止位。

有人有解决方案,或者只是因为Windows IOT?

感谢。

1 个答案:

答案 0 :(得分:1)

RPi3上的裸露UART不支持2个停止位,只有1个停止位。请查看this answer以获取引用,以及有关暴露的UART功能的更多详细信息。