linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* The RS485 driver problem...
@ 2005-01-31  8:51 David Jander
  0 siblings, 0 replies; 2+ messages in thread
From: David Jander @ 2005-01-31  8:51 UTC (permalink / raw)
  To: 'linuxppc-embedded@ozlabs.org'


Hi,

If you want to connect a RS485 transceiver to a normal UART, you always have 
the problem of dealing with enabling/disabling transmitter and recveiver. I 
have seen hardware that misuses RS-232 hardware handshaking lines (RTS/CTS) 
for this purpose. What I have not been able to find is a linux driver or 
software solution to this problem.

Has anybody used the CPM uarts (or even a standard 16C550 uart) for this 
purpose? How?

Greetings,

-- 
David Jander
Protonic Holland.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: The RS485 driver problem...
  2005-02-02  8:27 AW: " Martin Krause
@ 2005-02-02 13:15 ` Mark Chambers
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Chambers @ 2005-02-02 13:15 UTC (permalink / raw)
  To: linuxppc-embedded


linuxppc-embedded-bounces@ozlabs.org wrote on :
> If you want to connect a RS485 transceiver to a normal UART, you
> always have the problem of dealing with enabling/disabling
> transmitter and recveiver. I have seen hardware that misuses RS-232
> hardware handshaking lines (RTS/CTS) for this purpose. What I have
> not been able to find is a linux driver or software solution to this
> problem. 
> 
> Has anybody used the CPM uarts (or even a standard 16C550 uart) for
> this purpose? How?

I took a look at some old non-linux code for the MPC860, and it appears
that the RTSM bit in GSMR_H provides switched-RTS in UART mode.
It will negate RTS after the last character in a BD.  (SCCs only, not SMC)

Another trick you can use, depending on your hardware config, is to loop
your transmit data back to receive.  When you receive the last character
you sent you know it's safe to turn off RTS, and since you're getting an
interrupt it's deterministic.

Mark Chambers

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-02 13:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-31  8:51 The RS485 driver problem David Jander
  -- strict thread matches above, loose matches on Subject: below --
2005-02-02  8:27 AW: " Martin Krause
2005-02-02 13:15 ` Mark Chambers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).