We're no longer updating This wiki!!

This is an old revision of the document!


UART interface using the Tinkering Kit

There are two UART ports on the C2.
They are 3.3Volt (LVTTL) interface and there is no 5Volt tolerance.

The first one is mapped to /dev/ttyS1 which is connected to 40-pin header Pin #8 & #10 & ground pin.

The second one is mapped to /dev/ttyS0 which is connected to Serial Console Port CON5.

How to test external UART pin on the 40-pin header

You need to prepare below items.

  • ODROID-C2
  • USB-UART Module Kit
  • jumper wire x4
  • serial comunication utility on your Host PC

You will connect jumper wire as below picture.
Connect the USB-PORT of USB-UART Module to your HOST PC
The RXD and TXD must be twisted each other.

1. HOST PC setup.
You will open USB Module Device on your HOST PC.
Ubuntu
Install serial comunication utility.

sudo apt-get install minicom

After check your usb serial node, Open serial port.

ls /dev/ttyUSB*
sudo minicom -b 115200 -D /dev/ttyUSB0

2. Target board(ODROID-C2) setup.
Set a serial node on your ODROID-C2

stty -F /dev/ttyS1 115200

3. ODROID-C2 → HOST PC test.
ODROID-C2

echo 1 > /dev/ttyS1

4. HOST PC → ODROID-C2 test.
ODROID-C2

cat /dev/ttyS1

HOST PC
Send characters via minicom.

Pin Map : UART pin on the 4-pin CON5 connector

_____UART____
|           |
|Pin 4 - GND|
|Pin 3 - RXD|
|Pin 2 - TXD|
|Pin 1 - VCC|
|_          |
  |_________|

3.3V LVTTL

Another UART port on 40pin header

If you don't use an I2C interface(i2c-1) on pin#3 & pin#5, you can use them to activate the UART2.
Just follow campbell's development note to have a new UART2 port via /dev/ttyS2.
Note that Pin#3(SDA1) is mapped to Tx and Pin#5(SCL1) is Rx.
How to enable a third UART ttyS2 by "campbell"

Automatically configure the UART settings.

This is an example of default setting for a GPS module which has a 9600bpsN81 UART interface.
Add the following to the end of /etc/rc.local (before the exit 0)

/bin/stty -F /dev/ttyS2 raw 9600 cs8 clocal -cstopb > /dev/null 2>&1

This way the tty port is setup for use with the gps on system boot, without user interaction.

Tips for UART port

en/c2_hardware_uart.1484034424.txt.gz · Last modified: 2017/01/10 16:17 by odroid
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0