UARTs (i.MX31)
General considerations
The iMX features 2 seperate UART ports. Both of them are connected to the connector and then on the dev board to the appropriate ports, whereas one is directly attached to the serial interface using a level converter and the other is attached to a usb port using a usb to uart bridge.
Both UARTs can be switched on or off seperately by using the following dipswitches on the devboard
USBUART - Enables or disables the UART for the USB connector RS232 - Enables or disables the UART for the serial connector UARTSEL - Switches which UART (#1 or #2) is USB or Serial
By default, both of the two UARTs are enabled. Depending on the version of your development board / core module you might need to select / deselect the following kernel configuration options:
Networking -> IrDA support System Type -> Freescale MXC Implementations -> MX3 Options -> Bluetechnix i.MX31 Interrupt from Ethernet Controller on UART
in the Kernel Configuration.
The first UART is by default configured to 115200 8N1, the second UART is by default configured to 9600 8N1. This can be changed on the linux command line by running the following command:
# Configure a baud rate of 115200 on UART2 stty -F /dev/mxctty1 115200
Testing
The two UARTs can simply be tested by attaching the appropriate cables and writing text to the serial console using the command
echo "text" >/dev/ttymxc1