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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
8,031 次查看
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

标签 (2)
0 项奖励
回复
1 解答
6,474 次查看
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 项奖励
回复
3 回复数
6,305 次查看
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 项奖励
回复
6,475 次查看
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 项奖励
回复
6,475 次查看
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 项奖励
回复