ls1028 : How to use uart2 as an RS485 serial link ?

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

ls1028 : How to use uart2 as an RS485 serial link ?

700 次查看
xinliwang
Contributor III

Hi 

I want to use uart2 as an RS485 serial link. I was trying to add RTS pin control (set RTS to high or low) right after sending or receving message but I couldn't find the right source file to rewrite.

Does anyone know how can I control RTS pin either to high or low in order to send and receice message?

Thanks

 

0 项奖励
2 回复数

694 次查看
xinliwang
Contributor III

here I found a method by adding rts-gpios on devicetree.

rts-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;

There is an example for setting rts for 8250 serial.

Example for OMAP UART using GPIO-based modem control signals:

uart4: serial@49042000 {
compatible = "ti,omap3-uart";
reg = <0x49042000 0x400>;
interrupts = <80>;
ti,hwmods = "uart4";
clock-frequency = <48000000>;
cts-gpios = <&gpio3 5 GPIO_ACTIVE_LOW>;
rts-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
dtr-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
dsr-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
dcd-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
rng-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};

But it is an example for the OMAP UART, i wonder if it also works for ls1028a board?

Does anyone ever tried before?

0 项奖励

687 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Due to we are lack of Layerscape support resource so far, the thread could be delay answered.

I would like recommend to contact with your local NXP distributor  for priority support.

Thank you for the understanding.

Mike

0 项奖励