提示:作为Espressif(乐鑫科技)大中华区合作伙伴及sigmastar(厦门星宸)VAD合作伙伴,我们不仅用心整理了你在开发过程中可能会遇到的问题以及快速上手的简明教程供开发小伙伴参考。同时也用心整理了乐鑫及星宸科技的新产品、新方案的主要特点及应用!希望你能第一时间了解并快速用上好的方案和产品!
sigmastar ssd202d双网口开发板多串口调试说明
串口与设备节点的对应关系
**vi kernel/arch/arm/boot/dts/infinity2m-doublenet.dtsi**
aliases {console = &uart0;serial0 = &uart0;serial1 = &uart1;serial2 = &fuart;serial3 = &uart2;};
**
普通串口配置
vi kernel/arch/arm/boot/dts/infinity2m-ssc011a-s01a-padmux-rgb565-rmii-doublenet.dtsi
Fuart带流控:使用MODE1:默认波特率是9600
<PAD_FUART_RX PINMUX_FOR_FUART_MODE_1 MDRV_PUSE_FUART_RX>,
<PAD_FUART_TX PINMUX_FOR_FUART_MODE_1 MDRV_PUSE_FUART_TX>,
<PAD_FUART_CTS PINMUX_FOR_FUART_MODE_1 MDRV_PUSE_FUART_CTS>,
<PAD_FUART_RTS PINMUX_FOR_FUART_MODE_1 MDRV_PUSE_FUART_RTS>,
Fuart不带流控:使用MODE2:默认波特率是9600 // /dev/ttyS2
<PAD_FUART_RX PINMUX_FOR_FUART_MODE_2 MDRV_PUSE_FUART_RX>,
<PAD_FUART_TX PINMUX_FOR_FUART_MODE_2 MDRV_PUSE_FUART_TX>,
uart0配置:默认波特率是115200 // /dev/ttyS0
<PM_UART_RX PINMUX_FOR_UART0_MODE_1 MDRV_PUSE_UART0_RX >,
<PM_UART_TX PINMUX_FOR_UART0_MODE_1 MDRV_PUSE_UART0_TX >,
uart1配置:默认波特率是9600 // /dev/ttyS1
<PAD_UART1_RX PINMUX_FOR_UART1_MODE_1 MDRV_PUSE_UART1_RX>,
<PAD_UART1_TX PINMUX_FOR_UART1_MODE_1 MDRV_PUSE_UART1_TX>,
uart2配置:默认波特率是9600 // /dev/ttyS3
<PAD_GPIO8 PINMUX_FOR_UART2_MODE_2 MDRV_PUSE_UART2_RX>,
<PAD_GPIO9 PINMUX_FOR_UART2_MODE_2 MDRV_PUSE_UART2_TX>,
vi infinity2m-doublenet.dtsi
uart0: uart0@1F221000 {compatible = "sstar,uart";reg = <0x1F221000 0x100>;interrupts = <GIC_SPI INT_IRQ_UART_0 IRQ_TYPE_LEVEL_HIGH>;clocks = <&CLK_uart0>;status = "ok";};uart1: uart1@1F221200 {compatible = "sstar,uart";reg = <0x1F221200 0x100>;interrupts = <GIC_SPI INT_IRQ_UART_1 IRQ_TYPE_LEVEL_HIGH>;clocks = <&CLK_uart1>;status = "ok";};fuart: uart2@1F220400 {compatible = "sstar,uart";reg = <0x1F220400 0x100>, <0x1F220600 0x100>;interrupts = <GIC_SPI INT_IRQ_FUART IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI INT_IRQ_URDMA IRQ_TYPE_LEVEL_HIGH>;clocks = <&CLK_fuart>;dma = <0>;sctp_enable = <0>;//rts cts enable is 1//pad = <PAD_FUART_CTS>;//tolerance = <2>;status = "ok";};uart2: uart2@1F221400 {compatible = "sstar,uart";reg = <0x1F221400 0x100>;interrupts = <GIC_SPI INT_IRQ_UART_2 IRQ_TYPE_LEVEL_HIGH>;clocks = <&CLK_uart2>;status = "ok";};
我们在其他地方是由复用到这些串口引脚,所以需要关闭
- 把spi关掉