How to use UART for RK3399 RSB4710
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
RSB4710 Borad
COM Name | Device Node | Remark |
COM0 | /dev/ttyS0 |
for BT Data |
COM2 |
/dev/ttyS2 |
Debug Port |
COM4 |
/dev/ttyS4 |
support RS232, no flow control |
USB2COM0 |
/dev/ttyUSB0 |
support RS232 |
USB2COM1 | /dev/ttyUSB1 |
support RS232 |
USB2COM2 |
/dev/ttyUSB2 | support RS232 and RS485 |
USB2COM3 |
dev/ttyUSB3 |
support RS232 and RS485 |
Note :
1. Only COM4、USB2COM0、USB2COM1、USB2COM2、USB2COM3 are designed for custom using.
2. Only USB2COM2 and USB2COM3 support RSB485.
3. COM2 is designed as debug port default.
How to config RS232 or RS485 mode
Enter U-boot interrupt mode
Connect device to debug port, and open debug console. See more : How_to_debug.
Press "ctrl + c" key before power up the device, until get the following information on debug console :
Hit any key to stop autoboot: 0 => <INTERRUPT> =>
Then you can input the following cammand to config UART mode.
Config Uart Mode
setenv ttyUSB2 RS485 setenv ttyUSB3 RS485 saveenv reset
Note :
The default value is RS232.