It can be understood from the data manual that SSD20X has a total of 4 serial ports, of which 3 are ordinary uart and one fuart with flow control function:
- Correspondence between serial port and device node
#vi infinity2m.dtsi
According to the following correspondence:
设备节点 | 串口 |
---|---|
/dev/ttyS0 | uart0 |
/dev/ttyS1 | uart1 |
/dev/ttyS2 | fuart |
/dev/ttyS3 | uart2 |
- Open the serial port
Let’s take opening uart1 as an example to describe the configuration in the kernel when opening a common serial port.
Change the status in DTS to ok:#vi infinity2m.dtsi
Configure the corresponding pin as UART_MODE_1:#vi infinity2m-ssc011a-s01a-padmux-display.dtsi
Load SStar Serial/UART driver:
#cd kernel && ARCH=arm make menuconfig - Test
According to the corresponding relationship between the device node and the serial port, the device node corresponding to uart1 is /dev/ttyS1. Therefore, it is necessary to confirm whether /dev/ttyS1 exists first. If it exists, the node can be operated through the application program to conduct a communication test with the external serial device.
文档更新时间: 2020-10-24 18:42 作者:admin