How to add support rs485 half duplex

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add support rs485 half duplex

461 Views
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 Replies

17 Views
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

17 Views
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 Kudos