Difference between revisions of "IoTGateway/BSP/Android/Gettingstarted/How to use UART for rk"

From ESS-WIKI
Jump to: navigation, search
(Created page with "= <span style="color: rgb(0, 0, 205)">'''<span style="font-size: large">Overview</span>'''</span> = <span lang="en"><font color="#000000">The Android/Linux UART/serial port a...")
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
 
= <span style="color: rgb(0, 0, 205)">'''<span style="font-size: large">Overview</span>'''</span> =
 
= <span style="color: rgb(0, 0, 205)">'''<span style="font-size: large">Overview</span>'''</span> =
  
Line 5: Line 6:
 
== <span style="font-size: medium"><font color="#0066cc">RS-485</font></span> ==
 
== <span style="font-size: medium"><font color="#0066cc">RS-485</font></span> ==
  
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. Our modules provide the following support:
+
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.
 
 
Enable the RS-485 feature by either using ioctrl ''TIOCSRS485'' from user space as described in [https://github.com/ADVANTECH-Corp/linux-imx6/blob/imx_4.1.15_1.0.0_ga/Documentation/serial/serial-rs485.txt <font color="#0066cc">RS-485 Kernel Documentation</font>].
 
 
 
&nbsp;
 
  
 
= '''<span style="font-size: large"><span style="color: rgb(0, 0, 205)">Boards</span></span>''' =
 
= '''<span style="font-size: large"><span style="color: rgb(0, 0, 205)">Boards</span></span>''' =
Line 15: Line 12:
 
== RSB4680 Borad ==
 
== RSB4680 Borad ==
  
{| style="width: 500px" cellspacing="1" cellpadding="1" border="1" align="left"
+
{| align="left" border="1" cellpadding="1" cellspacing="1" style="width: 500px"
 
|-
 
|-
! scope="col" | '''COM Name'''
 
! scope="col" | '''Device'''<br/>
 
 
! scope="col" |  
 
! scope="col" |  
'''RS485 support'''
+
COM Name
 +
 
 +
(EPC-R4680)
 +
 
 +
! scope="col" |
 +
'''HW Schematic'''
 +
 
 +
'''(RSB-4680)'''
 +
 
 +
! scope="col" | '''Device Node'''
 +
! scope="col" |
 +
'''Remark'''
  
 
|-
 
|-
| COM1<br/>
+
| style="text-align: center" | N/A
| /dev/ttyS2<br/>
+
| style="text-align: center" | UART0
| <br/>
+
| style="text-align: center" | /dev/ttyS0
 +
| for BT Data
 
|-
 
|-
| COM2<br/>
+
| style="text-align: center" | COM5
| /dev/ttyS4<br/>
+
| style="text-align: center" | COM1
| Yes<br/>
+
| style="text-align: center" | /dev/ttyS1
 +
| RS232
 
|-
 
|-
| COM3<br/>
+
| style="text-align: center" | COM1
| <br/>
+
| style="text-align: center" | COM2
| <br/>
+
| style="text-align: center" | /dev/ttyS2
 +
| Debug Port/RS232
 
|-
 
|-
| COM4<br/>
+
| style="text-align: center" | COM6
| <br/>
+
| style="text-align: center" | COM3
| <br/>
+
| style="text-align: center" | /dev/ttyS3
 +
| RS232
 
|-
 
|-
| COM5<br/>
+
| style="text-align: center" | COM2
| <br/>
+
| style="text-align: center" | COM4
| <br/>
+
| style="text-align: center" | /dev/ttyS4
 +
| Supprot RSB485
 
|-
 
|-
| COM6<br/>
+
| style="text-align: center" | COM3
| <br/>
+
| style="text-align: center" | COM6
| <br/>
+
| style="text-align: center" | /dev/ttyUSB0
 +
| Usb to Uart
 +
|-
 +
| style="text-align: center" | COM4
 +
| style="text-align: center" | COM7
 +
| style="text-align: center" | /dev/ttyUSB1
 +
| Usb to Uart
 
|}
 
|}
  
 +
&nbsp;
  
 +
&nbsp;
  
 +
&nbsp;
  
 +
&nbsp;
  
 +
&nbsp;
  
 +
&nbsp;
  
 +
&nbsp;
  
 +
&nbsp;
  
 +
&nbsp;
  
 +
&nbsp;
  
 +
&nbsp;
  
 +
&nbsp;
  
 
&nbsp;
 
&nbsp;
  
[[File:ROM3420 COM.png|252x213px|ROM3420 COM.png]]
+
[[File:RS232andRS485Jumper.PNG|RTENOTITLE]]

Latest revision as of 10:11, 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

RSB4680 Borad

COM Name

(EPC-R4680)

HW Schematic

(RSB-4680)

Device Node

Remark

N/A UART0 /dev/ttyS0 for BT Data
COM5 COM1 /dev/ttyS1 RS232
COM1 COM2 /dev/ttyS2 Debug Port/RS232
COM6 COM3 /dev/ttyS3 RS232
COM2 COM4 /dev/ttyS4 Supprot RSB485
COM3 COM6 /dev/ttyUSB0 Usb to Uart
COM4 COM7 /dev/ttyUSB1 Usb to Uart

 

 

 

 

 

 

 

 

 

 

 

 

 

RTENOTITLE