UART1 on Windows
Hello,
I am trying to enable access to UART1 (Pins 8 and 10 on the header) on Windows IOT Core 64-bit.
First, to enable usermode access to a SerCx2 UART, you must add an rhproxy node to the ACPI tables. See
https://docs.microsoft.com/en-us/windows/uwp/devices-sensors/enable-usermode-access
I have created the following rhproxy node and injected it into the system ACPI tables. This causes a device interface to be created.
Device(RHPX) { Name(_HID, "MSFT8000") Name(_CID, "MSFT8000") Name(_UID, 1) Name(_CRS, ResourceTemplate() { // Index 0 UARTSerialBus( // UART0 115200, // InitialBaudRate: in bits ber second , // BitsPerByte: default to 8 bits , // StopBits: Defaults to one bit 0xfc, // LinesInUse: 8 1-bit flags to declare line enabled , // IsBigEndian: default to LittleEndian , // Parity: Defaults to no parity , // FlowControl: Defaults to no flow control 32, // ReceiveBufferSize 32, // TransmitBufferSize "\\_SB.PCI0.URT1", // ResourceSource: UART bus controller name , , , ) }) Name(_DSD, Package() { ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package() { Package(2) { "bus-UART-UART1", Package() { 0 }}, } }) }
I use mincomm as usermode test program (https://github.com/ms-iot/samples/tree/develop/MinComm). I can then enumerate the port:
mincomm -list 0 (UART1): \\?\ACPI#MSFT8000#1#{86e0d1e0-8089-11d0-9ce4-08003e301f73}\UART1
However, when I open the port and write data, I do not see any activity on the pins.
I tried forcing the driver to use the PIO path instead of DMA path by setting following reg keys:
reg add "HKEY_LOCAL_MACHINE\syste m\controlset001\services\sercx2\Parameters" /v TxPioThreshold /t REG_DWORD /d 0xffff reg add "HKEY_LOCAL_MACHINE\system\controlset001\services\sercx2\Parameters" /v RxPioThreshold /t REG_DWORD /d 0xffff
And I verified that the PIO path was taken, but I still don't see any activity on the pins.
I think it may be a pin muxing issue. Can you please confirm whether pins are muxed correctly to UART1?
More info:
UART1 driver instance: ACPI\8086228A\1 Name: Intel(R) Serial IO UART Controller Driver is running. iauarte.sys File version: 604.10146.2653.391 Product version: 604.10146.2653.65927
In BIOS, UART1 is set to "ACPI Mode"
BIOS is:
UP-CHT01 R0.S (UPC1BMOS) (6/4/2016)
Version 2.17.1249
Comments
-
To replicate my results,
Install Windows IOT Core 64-bit
Copy ACPITABL.dat to c:\windows\system32
Turn on testsigning and reboot:
bcdedit /set testsigning on
You should then see rhproxy running:
devcon status msft8000
And should be able to enumerate the port using mincomm.exe.
mincomm -list
Then type
mincomm
To open the port. Characters typed into the terminal will be sent over the serial port.