cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Participant
Participant
8,568 Views
Registered: ‎11-09-2015

RS485 using Axi 16550a half-duplex - Unable to stop echo of transmit characters

I have two 16550a's configured as RS485 Half-duplex.  The protocol is a command/response from the remote device.  When I send the command and then read the response, I see the command in the read buffer every time.  I've tried numerous termios flags, among other things.  The tx enable on the transceiver is controlled via gpio.  So, I assert the gpio (enable TX), write the data, read the FIFO control register until empty and then drop the tx enable.  I've also tried writing to the FIFO reset register just prior to dropping the TX enable gpio, thinking it would clear any data that was echoed, but that didn't seem to help.  Any ideas?  I don't want to parse the command from the response message if I can avoid it.

Tags (3)
0 Kudos
3 Replies
Highlighted
Adventurer
Adventurer
8,131 Views
Registered: ‎05-29-2015

Assuming that you're directly communicating with an external RS-485 Transciever, have you made sure that you disable the RX Enable (RE) pin before enabling the TX driver? Assuming you're using a chip like the Linear Technologies LTC1480, most transceiver chips will have separate TX Enable (DE) and RX enable (RE') that are complements of each other. For most applications, we typically tie a single GPIO to both pins. For example, with the LTC1480 - when GPIO output is LOW RX is enabled and TX is disabled, when GPIO is HIGH TX is enabled and RX is disabled, obviously it might be different for your chip. But, this is a common issue that has bitten us many times.

 

What does your schematic look like?

0 Kudos
Highlighted
Adventurer
Adventurer
8,130 Views
Registered: ‎05-29-2015

Just to note, if RX is enabled while you're transmitting you will most likely get your response echoed back into your RX FIFO. This is useful for collision detection.
0 Kudos
Highlighted
Scholar
Scholar
5,619 Views
Registered: ‎06-10-2008

0 Kudos