Other Parts Discussed in Thread: TEST2
Hello Team,
We are trying to use UART with Hardware flow control.
We defined UART3 in dtb as below:
uart3_pins: uart3_pins {
pinctrl-single,pins = <
AM4372_IOPAD(0x960, PIN_INPUT | MUX_MODE1) /* (R25) spi0_cs1.uart3_rxd */
AM4372_IOPAD(0x964, PIN_OUTPUT | MUX_MODE1) /* (G24) eCAP0_in_PWM0_out.uart3_txd */
AM4372_IOPAD(0x8c8, PIN_INPUT | MUX_MODE6) /* (A18) dss_data10.gpio2[16] */
AM4372_IOPAD(0x8cc, PIN_OUTPUT | MUX_MODE6) /* (B18) dss_data11.gpio2[17] */
>;
};
&uart3 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&uart3_pins>;
};
We are testing this UART3 with a USB-Serial converter with Hardware flow control. And my observations are as below:
1. When RTS CTS are connected, communication happens without any issue
2. When CTS on USB-Serial end is disconnected, board is able to send data to USB-Converter, but USB-Serial is not able to send data to board
3. When I connect CTS back, then I get the pending message
4. When CTS on board end is disconnected, communication happens on both side without any issue
So I feel, board shouldn't send any data to USB-Serial if CTS is disconnected, but I feel it is not taking care of CTS status and sending the data blindly.
I am using the below settings for this uart communication in my software:
term_set(uart_fd,
1, /* raw mode. */
115200, /* baud rate. */
P_NONE, /* parity. */
8, /* data bits. */
1, /* stop bits. */
FC_RTSCTS, /* flow control. */
1, /* local or modem */
1);
I hope RTS CTS should be taken care by underlying drivers only, and not by high level software. Please correct me if I am wrong.
Can somebody please let me know, is there any wrong with my dtb or code configuration?