On some processors (e.g. Vybrid VF6), it is possible to use the RTS signal for RS485 transceiver output control. I'm struggling trying to do the same on i.MX6SX. It seems to be achievable with the CTS signal though. Is it possible to configure the RTS pin for this functionality?
I want to use the modbus rtu protocol on our designed linux board-imx8mp Soc, so I need to enable the rs485 line in half-duplex. I have a few questions about this subject.
In the device tree, the rs485 connection is defined as follows
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
rts-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
cts-gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
status = "ok";
we are using ISO3086DW as a rs485 transciver
Connection is diagram listed below
uart3 Tx -------> rs485 transciver D
uart3 Rx -------> rs485 transive R
rts and cts pins are not connected.
GPIO0 -------> rs485 transciver's DE
GPIO1 -------> rs485 transciver's RE
I can transfer data from the RS485 line by controlling the RE and DE pins with custom gpio0 and gpio1. But I am experiencing connection timeout problem with Modbus RTU.
1.) Is there a convenient way to control Transmit and Receive directions?
2.) Should I connect the rts pins to the DE pin of the transciver and the uart driver should automatically control the transmit or receive direction
3.) Should I connect the cts pin to the RE pin of the transciver?
one can consider control of DCE/DTE mode described in
Figure 65-2. UART external signals to module signals routing with respect to DCE/DTE mode