How do I configure automatic sending and receiving for 485

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How do I configure automatic sending and receiving for 485

1,462件の閲覧回数
gongyaxuan
Contributor I

Can the 485 driver support 485 automatic enable sending and receiving? If yes, how to configure it

0 件の賞賛
返信
3 返答(返信)

1,440件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @gongyaxuan,

I hope you are doing well.

Configuring the 485, depends on which device you are using. What are their configurations? Kindly mention all details of i.MX development board and their prerequisites.
 
Thanks & Regards,
Sanket Parekh
0 件の賞賛
返信

1,418件の閲覧回数
gongyaxuan
Contributor I

Thanks 

I use imx93 board ,I tried to do this in the device tree, but it didn't seem to work,What is the right configuration

&lpuart3 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_uart3>;
    rts-gpios = <&at9555 12 GPIO_ACTIVE_HIGH>;
    rs485-rx-during-tx;
    rs485-rts-active-high;
    linux,rs485-enabled-at-boot-time;
    status = "okay";

};
0 件の賞賛
返信

1,402件の閲覧回数
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @gongyaxuan,

I hope you are doing well.

Normally, the UART interface on MCU could act as an RS485 controller with an external transceiver. It provides TTL logical signal and direction control signals; the RS485 transceiver provides voltage level translation, isolation, fault protection, etc. Usually, RS485 communication works in half-duplex mode.
The key to the design of UART to RS485 is how to control the direction of receiving and transmitting data. The above imx.c supports two control modes: GPIO or UART CTS. For the example, please refer below: https://community.nxp.com/t5/i-MX-Processors/Strange-RS485-latency-of-disabling-driver/m-p/984949?co...
UCM-iMX93 port: UART7
Linux device: /dev/ttyLP6
on SB-UCMIMX93 carrier-board: converted to RS485, terminal block
So you can refer to drivers/tty/serial/imx.c , which is a UART driver.
 
Thanks & Regards,
Sanket Parekh
0 件の賞賛
返信