Gumstix UARTs

The current Gumstix systems (both Basix and Connex) are based around the Intel PXA255 processor. This CPU has four UARTs on board, each of which can drive a serial port -- albeit with different capabilities and under different circumstances.

GPIO, AF1, AF2, AF3 below refer to the mode for GPIO pins. These echo commands are configuring how the GPIO pin works. GPIO means the pin can be used for a general purpose but the other three "alternate functions" will instead tie the pin to an internal PXA255 function like a clock or UART. The alternate functions available are different from pin to pin. See table 4-1 in the PXA Developer's Guide to see what alternate functions are available for each GPIO.

The Serial voltages page explains which boards use which voltage ranges, and the Serial adapters page mentions adapters which can be used to convert from logic level to RS-232 level.

FFUART
The FFUART (for Full-Function UART) serves as the default Linux console on the Gumstix, and supports rates of up to 230kbaud. It is exposed on nearly all 60-pin expansion boards.

The Gumstix Linux kernel maps the FFUART to /dev/ttyS0.

Despite its name, the Gumstix does not use the FFUART as a "full-function" serial port by default: when used as the system console, hardware flow control is disabled.

On all of the boards which have USB, the FFUART CTS and RTS signals are currently used as part of the USB hardware. The RTS is used to tell the host that it's ready (cable plugged in), and the CTS is used to detect cable insertion.

FFUART GPIO configuration: echo "AF1 in" > /proc/gpio/GPIO34 echo "AF2 out" > /proc/gpio/GPIO39

STUART
The STUART (for STandard UART) is available as a general-purpose serial port in most Gumstix configurations. The STUART supports rates of up to 230kbaud.

The STUART is exposed on the console-st, audiostix2, robostix, and roboaudiostix expansion boards.

Note that the GPSstix expansion board uses the STUART to communicate with the GPS module (without flow control according to the schematics, so RTS and CTS could be used for other things).

The Gumstix Linux kernel maps the STUART to /dev/ttyS2.

STUART GPIO configuration: echo "AF2 in" > /proc/gpio/GPIO46 echo "AF1 out" > /proc/gpio/GPIO47

.

HWUART
The HWUART (for HardWare UART) is available as a general-purpose serial port in some Gumstix configurations. The HWUART supports rates of up to 921kbaud.

Note: The verdex motherboard does not have HWUART. There are only 3 UARTs on a verdex.

The HWUART is exposed on the console-hw expansion board.

The HWUART can be routed to two different sets of pins. By default, it is routed to a set of pins shared with the BTUART (and connected to the Gumstix's Bluetooth module, if present). It can be routed to a different set, freeing up the HWUART and leaving the BTUART to control the Bluetooth module. However, this second set of pins is shared with the PCMCIA/CompactFlash interface, and thus cannot be used with expansion boards which have a CF card interface, or a network interface (including the wifistix). Currently, this includes all connex-only expansion boards.

The Gumstix Linux kernel maps the HWUART to /dev/ttyS3.

HWUART GPIO Configuration for HWUART on the 60-pin connector: echo "AF1 in" > /proc/gpio/GPIO49 echo "AF1 out" > /proc/gpio/GPIO48

That connects the Tx and Rx lines to GPIO48 & 49.

To enable CTS & RTS flow control: echo "AF1 in" > /proc/gpio/GPIO50 echo "AF1 out" > /proc/gpio/GPIO51

Then any software will need to enable hardware flow control after it opens ttyS3

HWUART GPIO Configuration for HWUART to bluetooth module: echo "AF3 in" > /proc/gpio/GPIO42 echo "AF3 out" > /proc/gpio/GPIO43

BTUART
The BTUART (for BlueTooth UART) is not used in most Gumstix configurations, including those with Bluetooth (which is controlled by the HWUART by default). The BTUART supports rates of up to 921kbaud.

The BTUART is only available on newer expansion board with breakout pads (like breakout-gs, audiostix2, GPSstix). Its pins (shared with the HWUART) are directly connected to the Bluetooth module, if present, and are only brought to the 60-pin connector to go to the daughtercards on newer gumstix (see this chart for details). Older gumstix brought out JTAG signals instead. If you are using bluetooth on the gumstix, then the BTUART will not be available for other use.

The Gumstix Linux kernel maps the BTUART to /dev/ttyS1.

BTUART GPIO Configuration for BTUART to bluetooth module: echo "AF1 in" > /proc/gpio/GPIO42 echo "AF2 out" > /proc/gpio/GPIO43 echo "AF1 in" > /proc/gpio/GPIO44 echo "AF2 out" > /proc/gpio/GPIO45

GPIO 44 and 45 are BTUART CTS and RTS, respectively.

Schematics
Schematic diagrams are available for the FFUART, STUART and HWUART.

breakout-gs
See Breakout for a diagram showing the locations of the UART signals on the breakout-gs board.

Connecting to a UART
When connecting from an external device to the gumstix via a UART you first need to run sertest on the port you wish to use. Also don't forget that you need a Serial adapters if you are connecting from a host machine.