Skip to main content

UART

COM Carrier board Differences

The uCOM Carrier Board V3 has an onboard Dual USB to serial IC making the external FTDI cable obsolete. The default position of the jumpers and the settings in both Linux and the U-Boot have been made so that the console always ends up on UART-A. As the name suggests, the uCOM Carrier Board only support the uCOM form factor and not the COM form factor.

BoardNXP nameLinuxCarrier board
iMX8M Mini uCOMUART1
UART2
UART4
/dev/ttymxc0 (M.2)
/dev/ttymxc1 (console)
Used by Cortex-M
UART-C
UART-A
UART-B
iMX8M Nano uCOMUART1
UART2
UART4
/dev/ttymxc0 (M.2)
/dev/ttymxc1 (console)
Used by Cortex-M
UART-C
UART-A
UART-B
iMX93 uCOMUART1
UART2
UART5
/dev/ttyLP0 (console)
Used by Cortex-M
/dev/ttyLP4 (M.2)
UART-A
UART-B
Via JTAG interface*
* - The UART is available on the JTAG pins, see more below

UART-B is by default reserved for the Cortex-M as its console. Instructions for using it from the Cortex-A can be found in Changing Console UART.

iMX8M Mini and iMX8M Nano uCOM

UART-C (i.e. UART1) is set up in the dts to be used by M.2 modules for Bluetooth. To use UART-C directly, four jumpers must be moved into correct positions. UART-C is normally directed to the M.2 connector for Bluetooth, but that must be disabled. Move JP21, JP22, JP23 and JP24 into the 2-3 position as shown in the figure below. UART-C will now be accessible on the Mikrobus/Click Module interface.

Jumpers to redirect UART-C

iMX93 uCOM

UART5 is set up in the dts to be used by M.2 modules for Bluetooth. The UART5 pins for the iMX93 are available on the JTAG pins (TCK, TMS, TDI and TDO) and by default those are connected to the M.2 Bluetooth pins. To use UART5 directly, make sure that there are no jumpers inserted in JP45 (left in the image) and that the jumpers in JP44 are in their default (left) position. The UART5 pins are now available on JP45.

Access to UART5 on imx93

U-Boot

No special tests to run in the U-Boot. The console gets tested automatically and the other UARTs are not available.

Linux

Using a COM Carrier Board V1 or V2

The examples below are for the iMX6 UltraLite COM board on a V1 or V2 carrier board, so replace the devices according to the CPU you are testing.

To see which UARTs are available.

ls /dev/ttymxc*
/dev/ttymxc0 /dev/ttymxc1 /dev/ttymxc2

The console uses /dev/ttymxc0, so it does not need further testing.

To test /dev/ttymxc1/ and /dev/ttymxc2/ cross-connect the RX and TX lines on the COM Carrier Board as shown above.

After connecting, set them up with a baud rate of 115200, raw mode and no echoing.

stty -F /dev/ttymxc1 115200 raw -echo
stty -F /dev/ttymxc2 115200 raw -echo

To listen on /dev/ttymxc1 and send on /dev/ttymxc2.

cat /dev/ttymxc1 &
echo Hello World > /dev/ttymxc2
Hello World

The & in the first command above means that it will be executed in the background. Don't forget to stop the background process when you're done with it by bringing it to the foreground and then pressing Ctrl+C.

fg
cat /dev/ttymxc1
^C

Using a uCOM Carrier Board V3

As can be seen in the table above, all the boards supported on the uCOM Carrier Board V3 have an extra Cortex-M core and the second UART on those boards are reserved for the Cortex-M. The best way to verify that the UART for the Cortex-M side is working is to run one of the example programs, for example the TTY application.