带流控的串口配置

HW接线如下:

RTS(RequireToSend,发送请求)为输出信号,用于指示本设备准备好可接收数据,低电平有效,说明本设备可以接收数据。
CTS(ClearToSend,发送允许)为输入信号,用于判断是否可以向对方发送数据,低电平有效,说明本设备可以向对方发送数据。
确认pin脚配置为Fuart模式:

<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节点打开sctp:

        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>;
            sctp_enable = <1>;
            PAD = <PAD_FUART_CTS>
            clocks = <&CLK_fuart>;
            dma = <0>;
            tolerance = <2>
            status = "ok";
        };
文档更新时间: 2024-02-21 17:04   作者:Aeeditor