How to configure RS-485 2-wire in dts ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to configure RS-485 2-wire in dts ?

Jump to solution
6,051 Views
jimhuangtw
Contributor II

Hi NXP team,

Currently, our design use 3 pins connecting iMX6UL and transceiver for RS-485 application.

The schematic of RS485 is as below. HW claim UART_TXDEN_RS485 to control the transmit or receive direction.

pastedImage_1.png

pastedImage_3.png

I refer the 4-wire case Use RTS_B pin instead of CTS_B pin for RS485 driver.

And, configure RS-485 in DTS as below. 

&uart6 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart6>;
status = "okay";
rts-gpio = <&gpio4 19 GPIO_ACTIVE_HIGH>;
rs485-rts-active-high;
rs485-rx-during-tx;
rs485-rts-delay = <1 1>;
linux,rs485-enabled-at-boot-time;
};

pinctrl_uart6: uart6grp {
fsl,pins = <
MX6UL_PAD_CSI_MCLK__UART6_DCE_TX 0x030b1
MX6UL_PAD_CSI_PIXCLK__UART6_DCE_RX 0x130b1
MX6UL_PAD_CSI_VSYNC__GPIO4_IO19 0x030b1
>;
};

I using 2 device to connect each other via RS-485 port with minicon utility.

I saw the TX signal is OK in Scope, but I don't see any word print at another device in minicom.

I notice the level of TXDEN should be different, so I reworked one device to keep low (receive the signal)
The result still fail.


Could you provide the example of RS-485 2-wire in DTS ?
Beside the DTS configuration, does something else we do wrong in schematic or testing case for RX mesasge?

Thanks,

Jim

Labels (2)
0 Kudos
1 Solution
4,494 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jim

if you are able to see signals on transmitter, then dts settings seem as ok.

Problem may be on receiver side, TXDEN would be different as both can not transmit

simulatneously. Also one can look at

[imx6] RS485 could be supported on Imx6 series ?  

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
3 Replies
4,325 Views
okwaj
Contributor III

Hi,

Did you find a way to make it work ?

I encounter the same issue and I configured the DTS like you but It seems the RE/DE pin doesn't change at all during transfer...

0 Kudos
4,495 Views
jimhuangtw
Contributor II

Hi Igor,

Thanks for your comment.
Since the dts configuration should be OK, I will co-work with HW to check the signal of receiver further.

Thanks,

Jim

0 Kudos
4,495 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jim

if you are able to see signals on transmitter, then dts settings seem as ok.

Problem may be on receiver side, TXDEN would be different as both can not transmit

simulatneously. Also one can look at

[imx6] RS485 could be supported on Imx6 series ?  

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos