How to add support rs485 half duplex

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

How to add support rs485 half duplex

1,230件の閲覧回数
hiectai
Contributor III

Hello community.
I have MX6DL custome board using rs485 half duplex, currently using 4.1.15 kernel. 
I have seen the file imx.c in drivers / tty / serial / imx.c but it seems to not support rs485.
My question is how to add support rs485 mode half duplex?
Thanks in advance

2 返答(返信)

786件の閲覧回数
weidong_sun
NXP TechSupport
NXP TechSupport

Hi タイ チャン,

   About I.MX6 UART to RS485 applications, I have some advice for you .

1. Using RS485 mode of UART directly.

On hardware, you should use UART_CTS_B to control RX & TX.

On software, The link for you reference:

Does UART in RS485 mode support only 9 Bit mode for i.MX6 ? 

2. Sensing IO direction Automatically via hardware, don't need to tune software.

pastedImage_3.png

Have a nice day!

NXP TIC Weidong Sun

786件の閲覧回数
hiectai
Contributor III

Hi  Wigros Sun

Thank you for answer.
I tried use UART_CTS_B to control RX & TX witch below setting:

/* enable RS485 mode: */
rs485conf.flags |= SER_RS485_ENABLED;

/* set logical level for RTS pin equal to 1 when sending: */
rs485conf.flags |= SER_RS485_RTS_ON_SEND;

UART_CTS_B pin has gone to high level when transmitting but after transmission is completed, it will not return to low level. In the default ,UART_CTS_B pin is high. This is the transmission waveform

pastedImage_1.png
How to change the default of UART_CTS_B pin to a low level to receive signals at any time?
Thank yo so much

0 件の賞賛