cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
2,699 Views
Registered: ‎03-22-2017

UART RTS/CTS signal usage for RS-485

Jump to solution

Hi there,

 

I'm trying to use the second serial port to control a RS-485 transceiver. For testing purposes, I have bought one of this breakouts.

The breakouts pin R/T are tied together and I plan to make use of serial modem control signals to control when to write/read.

For that purpose, I have enabled the control at EMIO and I have used example C code (this, this, this) and this site info to generate those control signals (checked with a logic analyzer) with little success.

 

So my questions are:

 

- Do I have to include anything referencing these pins at the device tree?

- Are this pins supported by Xilinx drivers? It look they weren't a time ago, I have found this thread.

- Is it possible to configure the serial port as RS-485 "natively", meaning at Linux level?

 

Thanks in advance,

 

imuguruza

 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Contributor
Contributor
2,852 Views
Registered: ‎03-22-2017

I'm using RTSN signal to control reads and writes. Even that timing looks not being perfect with some test should work.

 

imuguruza

View solution in original post

0 Kudos
3 Replies
Highlighted
Mentor
Mentor
2,683 Views
Registered: ‎06-10-2008

Can I assume that you're using a Zynq? If so, you could consider to use a modified uartlite as described here.

0 Kudos
Highlighted
Contributor
Contributor
2,853 Views
Registered: ‎03-22-2017

I'm using RTSN signal to control reads and writes. Even that timing looks not being perfect with some test should work.

 

imuguruza

View solution in original post

0 Kudos
Highlighted
Contributor
Contributor
2,571 Views
Registered: ‎02-20-2014

I don't think that RS485 does natively work with the Zynq UART.

Here RTSN means "ready to send" for the terminal, i.e. the Zynq UART RX FIFO is ready to accept data. At least according to the user manual:

In automatic flow control mode the request to send output is asserted and de-asserted based on the
current fill level of the receiver FIFO, which results in the far-end transmitter pausing transmission
and preventing an overflow of the UART receiver FIFO. 

None of the provided modem signals could seem to do the job of controlling a RS485 driver enable.

So I patched the UART Linux driver to control the RTSN by software when sending a byte. Currently I am working on an IP core that --- based on the TX start bit and a certain baurate -- automatically asserts the driver enable signal.

0 Kudos