Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
odroid-c2:application_note:gpio:uart [2017/06/27 17:27]
luke.go
odroid-c2:application_note:gpio:uart [2017/07/24 17:40]
luke.go ↷ Links adapted because of a move operation
Line 9: Line 9:
 ==== How to test external UART pin on the 40-pin header ==== ==== How to test external UART pin on the 40-pin header ====
  
-You need to prepare below items.+You need to prepare below items:
   * **ODROID-C2**   * **ODROID-C2**
   * USB-UART Module Kit   * USB-UART Module Kit
Line 17: Line 17:
 You will connect jumper wire as below picture.\\ You will connect jumper wire as below picture.\\
 Connect the USB-PORT of USB-UART Module to your HOST PC\\ Connect the USB-PORT of USB-UART Module to your HOST PC\\
-**The RXD and TXD must be twisted ​each other.**\\+**The RXD and TXD must be twisted ​together.**\\
  
 {{:​en:​c1:​odroidc1_uart.jpg?​300|}} {{:​en:​c1:​odroidc1_uart.jpg?​300|}}
Line 25: Line 25:
 **Ubuntu**\\ **Ubuntu**\\
 Install serial comunication utility. Install serial comunication utility.
 +<code bash host>
   sudo apt-get install minicom   sudo apt-get install minicom
 +</​code>​
 After check your usb serial node, Open serial port. After check your usb serial node, Open serial port.
 +<code bash host>
   ls /​dev/​ttyUSB*   ls /​dev/​ttyUSB*
   sudo minicom -b 115200 -D /​dev/​ttyUSB0   sudo minicom -b 115200 -D /​dev/​ttyUSB0
-  ​+</​code>​ 
 2. Target board(**ODROID-C2**) setup.\\ 2. Target board(**ODROID-C2**) setup.\\
 Set a serial node on your **ODROID-C2** Set a serial node on your **ODROID-C2**
 +<code bash target>
   stty -F /dev/ttyS1 115200   stty -F /dev/ttyS1 115200
 +</​code>​
  
 3. **ODROID-C2** -> HOST PC test.\\ 3. **ODROID-C2** -> HOST PC test.\\
 **ODROID-C2** **ODROID-C2**
 +<code bash target>
   echo 1 > /dev/ttyS1   echo 1 > /dev/ttyS1
-  ​+</​code>​ 
 4. HOST PC -> **ODROID-C2** test.\\ 4. HOST PC -> **ODROID-C2** test.\\
 **ODROID-C2** **ODROID-C2**
 +<code bash target>
   cat /dev/ttyS1   cat /dev/ttyS1
 +</​code>​
 +
 HOST PC\\ HOST PC\\
 Send characters via minicom. Send characters via minicom.
Line 68: Line 79:
 This is an example of default setting for a GPS module which has a 9600bpsN81 UART interface.\\ 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)\\ Add the following to the end of /​etc/​rc.local (before the exit 0)\\
-<​code>/​bin/​stty -F /dev/ttyS2 raw 9600 cs8 clocal -cstopb > /dev/null 2>&​1</​code>​+<​code ​target>/​bin/​stty -F /dev/ttyS2 raw 9600 cs8 clocal -cstopb > /dev/null 2>&​1</​code>​
 This way the tty port is setup for use with the gps on system boot, without user interaction.\\ This way the tty port is setup for use with the gps on system boot, without user interaction.\\
  
Line 77: Line 88:
 ==== How to enable UART_B and UART_C ports ==== ==== How to enable UART_B and UART_C ports ====
 Up to 4 ports can be used for UART in ODROID-C2---UART_A0(Serial console), UART_A, UART_B and UART_C.\\ Up to 4 ports can be used for UART in ODROID-C2---UART_A0(Serial console), UART_A, UART_B and UART_C.\\
-There are UART_A, UART_B and UART_C in [[..:​hardware:​c2_hardware_gpio_i2s_connector|expansion connectors of ODROID-C2]].+There are UART_A, UART_B and UART_C in [[..:..:​hardware:​expansion_connectors|expansion connectors of ODROID-C2]].
  
  
Line 93: Line 104:
 1. Kernel source download 1. Kernel source download
  
-<code bash>+<code bash target>
 sudo apt-get update sudo apt-get update
 sudo apt-get install git sudo apt-get install git
Line 184: Line 195:
  
 4. Install modified dtb file 4. Install modified dtb file
-<code bash>+<code bash target>
 make odroidc2_defconfig make odroidc2_defconfig
 make dtbs make dtbs