The MCA implements three UARTs in its firmware (starting from firmware version 0.13). When enabled, the serial ports are listed as /dev/ttyMCAx. The configuration options are limited to:

  • Baud rates: from 1200 up to 230400 bps. Note that for baudrates higher than 57600, flow control is recommended.

  • Parity: none, even, or odd.

  • Stop Bits: 1 or 2.

  • Hardware flow-control through CTS and RTS lines.

Manual handling of the RTS and CTS lines through standard TIOCMGET and TIOCMSET ioctls is not supported.

MCA IO pins selection

You can only use certain IO pins for the RX/TX lines of each UART:

MCA UART IOs for RX IOs for TX IOs for CTS IOs for RTS

UART0

MCA_IO6, MCA_IO9

MCA_IO5, MCA_IO10, MCA_IO13

any

any

UART1

MCA_IO11, MCA_IO15

MCA_IO16

any

any

UART2

MCA_IO2, MCA_IO8, MCA_IO17

MCA_IO1, MCA_IO7, MCA_IO18

any

any

On the ConnectCore 8X SBC Pro:

  • MCA UART2 is routed to the XBee socket with the following IO pins:

    • RX on MCA_IO2

    • TX on MCA_IO1

    • CTS on MCA_IO3

    • RTS on MCA_IO4

Kernel configuration

You can manage the MCA UART driver support through the following kernel configuration option:

  • Digi ConnectCore Micro Controller Assist assist UART (CONFIG_SERIAL_MCA)

This option is enabled as built-in on the default ConnectCore 8X kernel configuration file.

Kernel driver

The MCA UART driver is located at:

File Description

drivers/tty/serial/mca-uart.c

UART driver for MCA

Device tree bindings and customization

The MCA UART device tree binding is documented at Documentation/devicetree/bindings/serial/digi,mca-uart.txt.

Example: MCA UART on the ConnectCore 8X SBC Pro

UART controller inside the MCA

The MCA UARTs are defined in the ConnectCore 8X device tree.

ConnectCore 8X device tree
mca_cc8x: mca@63 {

	...

	mca_uart: uart {
		compatible = "digi,mca-cc8x-uart";
		#address-cells = <1>;
		#size-cells = <0>;

		mca_uart0: serial@0x900 {
			reg = <0x900>;
			index = <0>;
		};

		mca_uart1: serial@0x920 {
			reg = <0x920>;
			index = <1>;
		};

		mca_uart2: serial@0x940 {
			reg = <0x940>;
			index = <2>;
		};
	};
};

MCA UART enabling

The board device tree defines the pins to be used for each of the MCA UART lines.

ConnectCore 8X SBC Pro device tree
&mca_uart {
	status = "okay";

	/* Uncomment to enable MCA UART0. Assign the IO pins (see bindings) */
//	mca_uart0: serial@0x900 {
//		iopins-names = "rx", "tx";
//		iopins = <9 10>;
//	};

	/* Uncomment to enable MCA UART1. Assign the IO pins (see bindings) */
//	mca_uart1: serial@0x920 {
//		iopins-names = "rx", "tx";
//		iopins = <11 16>;
//	};

	/* UART connected to XBee socket */
	mca_uart2: serial@0x940 {
		iopins-names = "rx", "tx", "cts", "rts";
		iopins = <2 1 3 4>;
	};
};

Using the MCA UARTs

You can access the UARTs from your Android application. See Serial API for more information about the serial APIx.

Sample application

The Serial Port Sample Application demonstrates the usage of the serial port API. In this example, you can list all the available serial ports, configure them, and send and receive data.

Go to GitHub to see the application instructions and source code.