Search by Tags

WinCE Serial Ports

 

Article updated at 19 Jul 2021
Compare with Revision




Introduction

Colibri PXAxxx modules have 3 serial ports whereas Tegra, Vybrid and iMX6 modules support upto 5 serial ports (with some limitations). We also provide the schematic and drivers for a additional octal UART. See also Colibri Windows CE Features.

Full Feature UART

The FF UART is COM1. This UART supports all control lines.
On the Iris Carrier Board, this port is also called UART_A.
With the default settings, you can control the Bootloader over this UART. COM1 is not available in Windows CE if the debug messages are enabled. See Bootloader Menu for communication settings for bootloader and debug output.

Bluetooth UART

This is a normal UART. There is no special Bluetooth functionality on this port, it's just a name. On the Iris Carrier Board, this port is also called UART_B.

Standard UART

This UART provides only the Rx and Tx signals. On the Iris Carrier Board this port is also called UART_C.
On Vybrid this port is a regular serial port and does not support IRDA, so the following instructions don't apply. In the standard configuration, this UART is configured as IrDA port. Windows Embedded Compact 7 (WEC 7) does not support IrDA stack any longer. So on WEC 7 you do not have to disable anything.
On CE 5 and CE 6 you can use it as a normal UART. To do this, you have to do the following steps:

  • Switch COM3 to normal mode.

[HKLM\Drivers\BuiltIn\Serial3]
IrConnected=0

  • Disable the IrDA stack in the Registry (Windows CE 5 and 6 only). (See also Disable drivers)

[HKLM\Comm\IRSIR]
ImagePath = "_irsir.dll"

Tegra Modules

Use Alternative Pin Configuration

The 5 UART ports can be on different SODIMM / MXM3 Pins on the Tegra modules. With in image V2.0 beta 1 have introduced a registry key called PinMuxConfig for each serial port. This allows you to use different pin out options. By default we always use PinMuxConfig = 0. We recommend to use this one. Never the less if you need to use a different pin out, please refer the this: PDF document for all the possible options

"PinMuxConfig" = "dword:"       ;Select pinmuxing according Pin Mux Table documentation. Default value: 0

Add more Ports on Tegra Modules

The Colibri and Apalis Tegra modules support up to 5 serial ports. Just copy one of the existing entries. Increase the digit of the key name (Serial[X+1]) and increase the Index. Set the appropriate DeviceArrayIndex:

"DeviceArrayIndex" = "dword:16"  ;Defines which UART has to be used: 
                                 ;0x00000080: UART_A | 0x00000081: UART_B | 0x00000082: UART_C 
                                 ;0x00000083: UART_D | 0x00000084: UART_E

Note: On T20 Serial 5 (UARTE) is in conflict with the default SDIO. If you need all 5 UARTs on T20 either disable the SDIO driver or move the SDIO to the second recommended instance. A third option would be to use PinMuxConfig = 1 for UARTA and UARTE (not recommended).

Swapping Serial Ports

The logical ports (COM1, COM2, ...) can be swapped by registry settings of the respective serial ports.

To swap COM1 vs COM2, i.e. COM1 will be the BTUART, COM2 will be the FFUART:

[HKLM\Drivers\BuiltIn\Serial1]
Index = dword:2            ; (default is 1)
[HKLM\Drivers\BuiltIn\Serial2]
Index = dword:1            ; (default is 2)

Vybrid Modules

Add more Ports on VFxx Modules

The Colibri VFxx modules support up to 5 serial ports.

COM4 and COM5 are not enabled by default. To enable them, add following key and values in the registry or download registry entry from here.

Note:

  • There is no flow control on UARTD.
  • UARTE is in confilict with SDHC. If you need all 5 UARTs, disable SDHC driver in registry. [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\ESDHC] and change the "Dll" entry from esdhc.dll to _esdhc.dll.
  • Some signals on additional UARTs may require disabling features on UARTA (CoM1:, the full featured UART). For more information check VFxx pinmux detail.

UART D (COM4:)

 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\UARTD]
    "Order"=dword:1
    "Dll"="vybrid_serial.dll"
    "Prefix"="CoM"
    "Index"=dword:4
    "DeviceArrayIndex"=dword:3
   
    ; if COM5 is required
    "TXPIN"=dword:23
    "TXAF"=dword:6
    "RXPIN"=dword:31
    "RXAF"=dword:6
    
    ; if RTS/CTS on COM5 are not required
    ;"TXPIN"=dword:29
    ;"TXAF"=dword:7
    ;"RXPIN"=dword:37
    ;"RXAF"=dword:7
    ;
    ; [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\UARTA]
       ;"RIPIN"=dword:7fffffff
       ;"DSRPIN"=dword:7fffffff

UART E (COM5:)

 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\UARTE]
    "Order"=dword:1
    "Dll"="vybrid_serial.dll"
    "Prefix"="CoM"
    "Index"=dword:5
    "DeviceArrayIndex"=dword:4
    "TXPIN"=dword:51
    "TXAF"=dword:4
    "RXPIN"=dword:53
    "RXAF"=dword:4
 
    ; if we want to use also RTS and CTS we must disable RI and DTR for UARTA (COM1:)
    ;"RTSPIN"=dword:29
    ;"RTSAF"=dword:4
    ;"CTSPIN"=dword:37
    ;"CTSAF"=dword:4
    ;
    ; [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\UARTA]
       ;"RIPIN"=dword:7fffffff
       ;"DSRPIN"=dword:7fffffff
 

iMX6 Modules

iMX6 modules support up to 5 serial ports. COM4 and COM5 are not enabled by default. To enable them, add following key and values in the registry or download registry entry from here

Add more Ports on Apalis iMX6 Modules

Note: - UART_A will not be fully functional if you are using flow control for UART_E because apalispin_122 & apalispin_124 are used as UART1_RI and UART1_DCD

UART D (COM4:)

 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM4]
    "DeviceArrayIndex"=dword:00000003
    "IoLen"=dword:000000D4
    "Prefix"="COM"
    "Dll"="csp_serial.dll"
    "Index"=dword:00000004
    "Order"=dword:00000002

    ;if flow control is required
    ;"RTSToggleAlwaysOn"=dword:00000001
    ;"RTSPol"=dword:00000001
 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM4\Unimodem]
    "Tsp"="Unimodem.dll"
    "DeviceType"=dword:00000000
    "FriendlyName"="COM4 UNIMODEM"
    "DevConfig"=hex:\
     10,00,00,00,05,00,00,00,10,01,00,00,00,4B,00,00,00,00,08,00,00,00,00,00,\
     00
 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM4\Pinout_Default]
    "apalispin_138"="altfn=4"
    "apalispin_140"="altfn=4"

    ;if flow control is required
    ;"apalispin_175"="altfn=3"
    ;"apalispin_173"="altfn=3"
 
 

UART E (COM5:)

 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM5]
    "DeviceArrayIndex"=dword:00000004
    "IoLen"=dword:000000D4
    "Prefix"="COM"
    "Dll"="csp_serial.dll"
    "Index"=dword:00000005
    "Order"=dword:00000004

    ;if flow control is required
    ;"RTSToggleAlwaysOn"=dword:00000001
    ;"RTSPol"=dword:00000001
 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM5\Unimodem]
    "Tsp"="Unimodem.dll"
    "DeviceType"=dword:00000000
    "FriendlyName"="COM5 UNIMODEM"
    "DevConfig"=hex:\
     10,00,00,00,05,00,00,00,10,01,00,00,00,4B,00,00,00,00,08,00,00,00,00,00,\
     00
 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM5\Pinout_Default]
    "apalispin_120"="altfn=2"
    "apalispin_110"="altfn=2"

    ;if flow control is required
    ;"apalispin_122"="altfn=2"
    ;"apalispin_124"="altfn=2"
 

Add more Ports on Colibri iMX6 Modules

UART D (COM4:)

 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM4]
    "DeviceArrayIndex"=dword:00000003
    "IoLen"=dword:000000d4
    "Prefix"="COM"
    "Dll"="csp_serial.dll"
    "Index"=dword:00000004
    "Order"=dword:00000002

    ;if flow control is required
    ;"RTSToggleAlwaysOn"=dword:00000001
    ;"RTSPol"=dword:00000001
 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM4\Unimodem]
    "Tsp"="Unimodem.dll"
    "DeviceType"=dword:00000000
    "FriendlyName"="COM4 UNIMODEM"
    "DevConfig"=hex:10,00,00,00,05,00,00,00,10,01,00,00,00,4b,00,00,00,00,08,00,00,\
     00,00,00,00
 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM4\Pinout_Default]
    "colibripin_167"="altfn=3"
    "colibripin_165"="altfn=3"

    ;if flow control is required
    ;"colibripin_173"="altfn=3"
    ;"colibripin_175"="altfn=3"
 

UART E (COM5:)

 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM5]
    "DeviceArrayIndex"=dword:00000004
    "IoLen"=dword:000000d4
    "Prefix"="COM"
    "Dll"="csp_serial.dll"
    "Index"=dword:00000005
    "Order"=dword:00000002

    ;if flow control is required
    ;"RTSToggleAlwaysOn"=dword:00000001
    ;"RTSPol"=dword:00000001
 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM5\Unimodem]
    "Tsp"="Unimodem.dll"
    "DeviceType"=dword:00000000
    "FriendlyName"="COM5 UNIMODEM"
    "DevConfig"=hex:10,00,00,00,05,00,00,00,10,01,00,00,00,4b,00,00,00,00,08,00,00,\
     00,00,00,00
 
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM5\Pinout_Default]
    "colibripin_171"="altfn=3"
    "colibripin_169"="altfn=3"

    ;if flow control is required
    ;"colibripin_177"="altfn=3"
    ;"colibripin_179"="altfn=3"