RS485 on i.mx6sx

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,387件の閲覧回数
kubiznak_petr
Contributor V

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?

0 件の賞賛
1 解決策
1,362件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi kubiznak_petr

 

unfortunately it is not possible only switch RTS<->CTS in software.

 

Best regards
igor

元の投稿で解決策を見る

0 件の賞賛
5 返答(返信)
424件の閲覧回数
alaskora_byk_mstang
Contributor I

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?

0 件の賞賛
1,372件の閲覧回数
kubiznak_petr
Contributor V

<dummy>

0 件の賞賛
1,381件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

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

1,369件の閲覧回数
kubiznak_petr
Contributor V

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?

0 件の賞賛
1,363件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi kubiznak_petr

 

unfortunately it is not possible only switch RTS<->CTS in software.

 

Best regards
igor

0 件の賞賛