# Uart as RS485 ccardimx28js

**URL:** <https://forums.digi.com/t/uart-as-rs485-ccardimx28js/15767>\
**Category:** Linux\
**Tags:** rs485, ccardimx28js\
**Created:** [November 12, 2015, 8:18am UTC](https://forums.digi.com/t/uart-as-rs485-ccardimx28js/15767 "2015-11-12T08:18:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Curby](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@Curby](https://forums.digi.com/u/Curby)\
**Post date:** [November 12, 2015, 8:18am UTC](https://forums.digi.com/t/uart-as-rs485-ccardimx28js/15767/1 "2015-11-12T08:18:16Z")

</div>

Hello,

i’m trying to use my Uart1 as RS485 (and Modbus RTU).

Using an RS232 to RS485 Converter works fine.

No i want to implement the RS485 on my sutomboard. Therefor i have to use a chip converter. This chips needs a Pin for switching between sending an receiving.

My suggestions:

1. Driving this Pin with a gpio before and after sending data. But how to check if all my data is sucessfully send?

2. Using serial RTS Pin. I found some code on the net, but it return -1.

“rs485conf.flags |= SER\_RS485\_ENABLED;  
rs485conf.delay\_rts\_before\_send = 0x00000004;  
ioctl(fd, TIOCSRS485, &rs485conf);”

Can someone help to drive my uart as Rs485?

Nils

---

<div class="post-metadata">

**Author:** ![LeonidM](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@LeonidM](https://forums.digi.com/u/LeonidM)\
**Post date:** [November 21, 2015, 8:44pm UTC](https://forums.digi.com/t/uart-as-rs485-ccardimx28js/15767/2 "2015-11-21T20:44:02Z")

</div>

I think you are trying to implement a Half Duplex RS485 solution on ccwimx28. Are you using Digi Embedded Linux or Digi Embedded Yocto? DEL implementation for ccwimx28 does not support half duplex RS485. you might need to build an adapter to go from full to half duplex: [http://www.maximintegrated.com/en/app-notes/index.mvp/id/4554](http://www.maximintegrated.com/en/app-notes/index.mvp/id/4554)

DEY 1.6.2.3+ has support for Half Duplex RS484 in Kernel 3.10 only
