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?
解決済! 解決策の投稿を見る。
Hi kubiznak_petr
unfortunately it is not possible only switch RTS<->CTS in software.
Best regards
igor
Hello,
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
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
uart-has-rtscts;
rts-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
cts-gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
status = "ok";
};
//Halfduplex
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?
<dummy>
Hi kubiznak_petr
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
i.MX 6SoloX Applications Processor Reference Manual
Best regards
igor
Hi igor,
Thanks for your reply. That looks promissing but then the issue would be that the RX/TX signals would be switched too, right? Or is it possible to only switch RTS<->CTS in software?
Hi kubiznak_petr
unfortunately it is not possible only switch RTS<->CTS in software.
Best regards
igor