Difference between revisions of "How to use UART"
From ESS-WIKI
Yunjin.jiang (talk | contribs) |
|||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | + | <h1><b>Overview</b></h1> | |
− | <font color="#000000">The Android/Linux UART/serial port access from user is through the tty-devices. The tty-devices have different names depending on UART driver on different board.</font> | + | <p><font color="#000000">The Android/Linux UART/serial port access from user is through the tty-devices. The tty-devices have different names depending on UART driver on different board.</font></p> |
− | + | <h2><font color="#0066cc">RS-485</font></h2> | |
− | RS-485 uses half-duplex communication, which means that one medium is shared for transmitting and receiving data. Therefore the system needs to control the RS-485 transceiver | + | <p>RS-485 uses half-duplex communication, which means that one medium is shared for transmitting and receiving data. Therefore the system needs to control the RS-485 transceiver's transmit mode. Usually the UART RTS signal is used to switch the transmitter on and off.</p> |
− | + | <h1><b>Boards</b></h1> | |
− | + | <h2>EPC-4680 Borad</h2> | |
− | + | <table border="1" cellpadding="1" cellspacing="1" style="width:500px;"> | |
− | + | <tbody> | |
− | + | <tr> | |
− | + | <td style="width: 119px;"><span style="color:#FF0000;"><b>COM Name</b></span></td> | |
− | + | <td style="width: 123px;"><span style="color:#FF0000;"><b>Device Node</b></span></td> | |
− | + | <td style="width: 240px;"><span style="color:#FF0000;"><b>Remark</b></span></td> | |
+ | </tr> | ||
+ | <tr> | ||
+ | <td style="width: 119px;">COM0</td> | ||
+ | <td style="width: 123px;">/dev/ttyS0</td> | ||
+ | <td style="width: 240px;"> BT</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td style="width: 119px;">COM1</td> | ||
+ | <td style="width: 123px;">/dev/ttyS2</td> | ||
+ | <td style="width: 240px;">Debug Port</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td style="width: 119px;">COM2</td> | ||
+ | <td style="width: 123px;">/dev/ttyS4</td> | ||
+ | <td style="width: 240px;">485</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td style="width: 119px;">COM3</td> | ||
+ | <td style="width: 123px;">/dev/ttyUSB0</td> | ||
+ | <td style="width: 240px;"> </td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td style="width: 119px;">COM4</td> | ||
+ | <td style="width: 123px;">/dev/ttyUSB1 </td> | ||
+ | <td style="width: 240px;"> </td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td style="width: 119px;">COM5</td> | ||
+ | <td style="width: 123px;">/dev/ttyS1</td> | ||
+ | <td style="width: 240px;"> </td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td style="width: 119px;">COM6</td> | ||
+ | <td style="width: 123px;">/dev/ttyS3 </td> | ||
+ | <td style="width: 240px;"> </td> | ||
+ | </tr> | ||
+ | </tbody> | ||
+ | </table> | ||
− | + | <p> </p> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | <p> </p> | ||
+ | <p><span style="color:#FF0000;"><b>Note : </b></span></p> | ||
+ | <p>1. Only COM1、COM2、COM3、COM4、COM5 and COM6 are designed for custom using.</p> | ||
+ | <p>2. Only COM4 support RSB485.</p> | ||
− | + | <p>3. COM2 is designed as debug port default. </p> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | ||
− | |||
− | |||
− | |||
− |
Latest revision as of 09:47, 11 June 2024
Contents
Overview
The Android/Linux UART/serial port access from user is through the tty-devices. The tty-devices have different names depending on UART driver on different board.
RS-485
RS-485 uses half-duplex communication, which means that one medium is shared for transmitting and receiving data. Therefore the system needs to control the RS-485 transceiver's transmit mode. Usually the UART RTS signal is used to switch the transmitter on and off.
Boards
EPC-4680 Borad
COM Name | Device Node | Remark |
COM0 | /dev/ttyS0 | BT |
COM1 | /dev/ttyS2 | Debug Port |
COM2 | /dev/ttyS4 | 485 |
COM3 | /dev/ttyUSB0 | |
COM4 | /dev/ttyUSB1 | |
COM5 | /dev/ttyS1 | |
COM6 | /dev/ttyS3 |
Note :
1. Only COM1、COM2、COM3、COM4、COM5 and COM6 are designed for custom using.
2. Only COM4 support RSB485.
3. COM2 is designed as debug port default.