Delen via


UART Controller Test(Basic tests)

This automated test verifies requirements of Universal Asynchronous Receiver/Transmitter (UART) controllers. The test covers baud rate support and throughput assessment.

Test details

Associated requirements

Device.BusController.UART.DMA Device.BusController.UART.HCKTestability Device.BusController.UART.ReadWrite Device.BusController.UART.SupportedBaudRates

See the device hardware requirements.

Platforms

Windows RT 8.1 Windows 8.1 x64 Windows 8.1 x86

Expected run time

~5 minutes

Categories

Basic

Type

Automated

 

Prerequisites

This test requires external connectivity pin-outs. The test also requires that you change the Advanced Configuration and Power Interface (ACPI) firmware to enumerate the UART test.

Before you run the test, perform the following steps. For all steps, <hckcontrollername> is a Windows HCK controller and <architecture> is the architecture of the device under test (DUT); these are ARM, AMD64, or x86.

  1. Perform the system changes that are described under the Device.BusController.UART.HCKTestability requirement.

  2. Update the ACPI table for UART test drivers based on the template that is located at \\<hckcontrollername>\Tests\<architecture>\UART\Sample-UART.asl.

  3. Install the UARTTest test peripheral driver from \\<hckcontrollername>\Tests\<architecture>\UART\UARTTest.inf.

  4. Edit the UART capabilities XML file to match the UART controller capabilities. The XML file is located at \\<hckcontrollername>\Tests\<architecture>\UART\UartCapabilities.xml.

    The fields in the UartCapabilities.xml file are defined as follows:

    Parameter Description Default value

    SettableStopBitsMask

    DWORD value that maps to the supported stop bits settings from the SettableStopParity bitmask of the SERIAL_COMMPROP structure.

    7

    SettableParityMask

    DWORD value mapping to the supported parity settings from the SettableStopParity bitmask of the SERIAL_COMMPROP structure.

    7936

    SettableWordLengthMask

    DWORD value mapping to the supported word length settings from the SettableData bitmask of the SERIAL_COMMPROP structure.

    15

    SettableBaudRates

    Supported baud rate values.

    1152003000000

    DmaMtu

    DMA MTU

    4

    DmaMaxTransferSize

    DMA maximum transfer size. Note that multiple transfers can be performed in a single request.

    4096

    FifoHighWatermark

    Hardware FIFO size.

    16

    IdleTimeout

    Activity timeout before UART DUT goes from D0 to Dx.

    200

     

Running the test

This automated test runs one time as it is detected and scheduled by Windows Hardware Certification Kit (Windows HCK) Studio. In Windows HCK Studio, on the Device selection page, select Microsoft UART Test Peripheral device to select UART-specific Windows HCK tests.

Alternately, you can run the test from the command line. To run the test from the command line, you must copy the following files from the Windows HCK controller to the DUT:

Files Source location on a Windows HCK

TAEF binaries

\TaefBinaries\*

Test binaries

\Tests\<architecture>\UART\*

 

Where <architecture> is the platform of the DUT; these are ARM, AMD64, or x86.

To run the test from the command line, type the following command from a command prompt that has administrative privileges:

te.exe SerCxTestHarness.dll /p:InternalLoopback=[EnableLoopback] /p:Capabilities=Table:[CapabilitiesFileName]#[CapabilitiesTableId] /p:Category=[Category] /p:UartDriver=[UartDriver]

Where the command line parameter definitions are as follows:

Parameter Definition Default value in Windows HCK

EnableLoopback

0 for hardware loopback

1 for internal loopback

0

CapabilitiesFileName

XML file that contains the UART device capabilities description.

UartCapabilities.xml

CapabilitiesTableId

UartCapabilities.XML table name attribute value.

Default

Category

Windows HCK Test category.

Basic or Functional

 

For more information how to run test commands by using the Test Authoring and Execution Framework (TAEF) service, see TAEF: Executing Tests and Te.exe Command Options.

Test parameter descriptions

Parameter name Description Default value

CapabilitiesTableId

UartCapabilities.XML table name attribute value.

Default

 

Troubleshooting

For additional troubleshooting information, see Troubleshooting Bus Controller Testing.

Error Description Solution/Workaround

UART controller driver Windows HCK tests do not display in Windows HCK Studio

When you select UART controller driver in Windows HCK Studio, the Windows HCK tests do not display on the Tests page.

  1. Make sure that the test peripheral driver UARTTest.sys is loaded, as described in the preceding Prerequisites section.

  2. Select UART test in the list on the Tests page.

Read requests do not appear to read any bytes.

The test takes a long time to complete. Write requests are all successful and read requests all fail.

Make sure that the UART DUT test has exposed pinouts and is connected in hardware loopback mode.

 

UART Controller Test(Functional tests)

UART Controller Test(Stress)

 

 

Send comments about this topic to Microsoft