Difference between revisions of "How to use UART"

From ESS-WIKI
Jump to: navigation, search
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
= '''Overview''' =
+
<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>
  
== <font color="#0066cc">RS-485</font> ==
+
<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's transmit mode. Usually the UART RTS signal is used to switch the transmitter on and off.
+
<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&#39;s transmit mode. Usually the UART RTS signal is used to switch the transmitter on and off.</p>
  
= '''Boards''' =
+
<h1><b>Boards</b></h1>
  
== RSB4680 Borad ==
+
<h2>EPC-4680 Borad</h2>
  
{| cellspacing="1" cellpadding="1" border="1" align="left"
+
<table border="1" cellpadding="1" cellspacing="1" style="width:500px;">
|-
+
<tbody>
! scope="col" | '''COM Name'''
+
<tr>
! scope="col" | '''Device Node'''<br/>
+
<td style="width: 119px;"><span style="color:#FF0000;"><b>COM Name</b></span></td>
! scope="col" |
+
<td style="width: 123px;"><span style="color:#FF0000;"><b>Device Node</b></span></td>
'''Remark'''
+
<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;">&nbsp;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;">&nbsp;</td>
 +
</tr>
 +
<tr>
 +
<td style="width: 119px;">COM4</td>
 +
<td style="width: 123px;">/dev/ttyUSB1&nbsp;</td>
 +
<td style="width: 240px;">&nbsp;</td>
 +
</tr>
 +
<tr>
 +
<td style="width: 119px;">COM5</td>
 +
<td style="width: 123px;">/dev/ttyS1</td>
 +
<td style="width: 240px;">&nbsp;</td>
 +
</tr>
 +
<tr>
 +
<td style="width: 119px;">COM6</td>
 +
<td style="width: 123px;">/dev/ttyS3&nbsp;</td>
 +
<td style="width: 240px;">&nbsp;</td>
 +
</tr>
 +
</tbody>
 +
</table>
  
|-
+
<p>&nbsp;</p>
| COM0<br/>
 
| /dev/ttyS0<br/>
 
| for BT Data<br/>
 
|-
 
| COM1<br/>
 
| /dev/ttyS1<br/>
 
| <br/>
 
|-
 
| COM2<br/>
 
| /dev/ttyS2<br/>
 
| Debug Port<br/>
 
|-
 
| COM3<br/>
 
| /dev/ttyS3<br/>
 
| <br/>
 
|-
 
| COM4<br/>
 
| /dev/ttyS4<br/>
 
| Supprot RSB485<br/>
 
|-
 
| COM5<br/>
 
| /dev/ttyUSB0<br/>
 
| Usb to Uart<br/>
 
|-
 
| COM6<br/>
 
| /dev/ttyUSB1<br/>
 
| Usb to Uart<br/>
 
|}
 
  
 +
<p>&nbsp;</p>
  
 +
<p><span style="color:#FF0000;"><b>Note&nbsp;:&nbsp;</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.&nbsp;</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
&nbsp;
 
 
 
=  =
 
 
 
=  =
 
 
 
=  =
 
 
 
=  =
 
 
 
=  =
 
 
 
<span style="color:#FF0000;">'''Note :&nbsp;'''</span>
 
 
 
1. COM1、COM2、COM3、COM4、COM5 and COM6 are designed for custom using.
 
 
 
2.&nbsp;
 
 
 
=  =
 
 
 
= Test uart =
 
 
 
TBD
 

Latest revision as of 10:47, 11 June 2024

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

<tbody> </tbody>
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.