Configuring LTC2873 with iMX6 uart for Half duplex

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

Configuring LTC2873 with iMX6 uart for Half duplex

624 Views
suryakanta_moha
Contributor II

We are using LTC2873 RS232 / half duplex RS485 chip with iMX6 UART .

We have observed that when we enable the (RS232/RS485 = gpio (93)=1, RE = gpio (205) and DE = gpio (84) in transmit mode we were able to receive the data which is transmitted from iMx6.i.e iMX6 as transmitter..

However when we changed the RE and DE to receive mode, we could see only few characters are received and few are missed.


Used below commands to toggle GPIO's to enable RS485 and 485 in receiving mode as well..

echo 205 > /sys/class/gpio/export
echo 84 > /sys/class/gpio/export
echo 93 > /sys/class/gpio/export


echo out > /sys/class/gpio/gpio93/direction
echo out > /sys/class/gpio/gpio84/direction
echo out > /sys/class/gpio/gpio205/direction


echo 1 > /sys/class/gpio/gpio93/value
echo 0 > /sys/class/gpio/gpio84/value
echo 0 > /sys/class/gpio/gpio205/value


Issue 1 . We are missing few characters when we use " cat /dev/ttymxc0 " , but below ISR function in imx.c receiving all the characters..     static irqreturn_t imx_rxint(int irq, void *dev_id) .   


Issue 2: How to enable Rx and TX as and when needed, using IOCTL from sender/receiver application? Is imx driver supports these ioctl functionality to toggle / set these RE / DE pins ?

Issue 3: We are using B115200 on both at transmitter and receiver. When we try to set the B9600 on ttymxc0, after few sec Baudrate on ttymxc0 resetting to B115200?

Labels (1)
0 Kudos
1 Reply

569 Views
jamesbone
NXP TechSupport
NXP TechSupport

Issue 1 . We are missing few characters when we use " cat /dev/ttymxc0 " , but below ISR function in imx.c receiving all the characters..     static irqreturn_t imx_rxint(int irq, void *dev_id) . 

ANSWER. you need to have flow control to avoid this kind of missing data. This can be done with SW or HW.

 


Issue 2: How to enable Rx and TX as and when needed, using IOCTL from sender/receiver application? Is imx driver supports these ioctl functionality to toggle / set these RE / DE pins ?

ANSWER.  Yes, this need to be done at  driver level. You can use IOCTL to modify the registers of the UART to change the signals as needed, but rememeber that you are going to affect all other UART including the DEBUG .

 

Issue 3: We are using B115200 on both at transmitter and receiver. When we try to set the B9600 on ttymxc0, after few sec Baudrate on ttymxc0 resetting to B115200?

ANSWWER.  How you are doing this change?

0 Kudos