The Rockchip UART (Universal Asynchronous Receiver/Transmitter) is based on the 16550A serial port standard. A complete module supports the following functions:
Supports 5, 6, 7, and 8 bits of data.
Supports 1, 1.5, and 2 bits of stop bits.
Supports odd and even parity, but not mark or space parity.
Supports receive and transmit FIFOs, typically 32 or 64 bytes.
Supports a maximum baud rate of 4MHz; actual supported baud rates require specific chip clock division strategies.
Supports interrupt-driven transfer mode and DMA transfer mode.
Supports hardware automatic flow control, RTS+CTS.
Note: The actual UART functions supported by the chip should be based on the description in the UART section of the chip's datasheet. Some UART functions may be appropriately trimmed.
The YY3588 development board provides four UARTs for customer use, registered as ttyS3, ttyS4, ttyS8, and ttyS9 respectively. Please refer to the schematic diagram for their corresponding hardware locations.
$ ls /dev/ttyS*
/dev/ttyS3 /dev/ttyS4 /dev/ttyS8 /dev/ttyS9
Short-circuit the target serial port rx and tx (taking UART3 as an example)
$ sudo su
#
# View serial port information
# stty -F /dev/ttyS3
# Set the serial port baud rate to 115200
# stty -F /dev/ttyS3 speed 115200
# Set the serial port to eight data bits, no parity, one stop bit, and no echo
# stty -F /dev/ttyS3 cs8 -parenb -cstopb -echo
# Loopback test
# cat /dev/ttyS3 &
# echo -e "youyeetoo\n" > /dev/ttyS3